From 48c1a2bdfc5a8195b2dbbb2983204916cf59bd16 Mon Sep 17 00:00:00 2001 From: Harsh J Date: Fri, 13 Jul 2012 07:26:54 +0000 Subject: [PATCH] MAPREDUCE-4422. YARN_APPLICATION_CLASSPATH needs a documented default value in YarnConfiguration. Contributed by Ahmed Radwan. (harsh) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1361061 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../hadoop/yarn/conf/YarnConfiguration.java | 17 ++++++++++++++++- .../src/main/resources/yarn-default.xml | 13 +++---------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 292a42b2de3..5f034c8ed05 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -159,6 +159,9 @@ Branch-2 ( Unreleased changes ) MAPREDUCE-3906. Fix inconsistency in documentation regarding mapreduce.jobhistory.principal. (Eugene Koontz via harsh) + MAPREDUCE-4422. YARN_APPLICATION_CLASSPATH needs a documented default + value in YarnConfiguration. (Ahmed Radwan via harsh) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java index 26ef90d894c..6f2c11f1331 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/conf/YarnConfiguration.java @@ -541,10 +541,25 @@ public class YarnConfiguration extends Configuration { public static final long DEFAULT_NM_PROCESS_KILL_WAIT_MS = 2000; - /** Standard Hadoop classes */ + /** + * CLASSPATH for YARN applications. A comma-separated list of CLASSPATH + * entries + */ public static final String YARN_APPLICATION_CLASSPATH = YARN_PREFIX + "application.classpath"; + /** + * Default CLASSPATH for YARN applications. A comma-separated list of + * CLASSPATH entries + */ + public static final String DEFAULT_YARN_APPLICATION_CLASSPATH = + "$HADOOP_CONF_DIR," + "$HADOOP_COMMON_HOME/share/hadoop/common/*," + + "$HADOOP_COMMON_HOME/share/hadoop/common/lib/*," + + "$HADOOP_HDFS_HOME/share/hadoop/hdfs/*," + + "$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*," + + "$YARN_HOME/share/hadoop/mapreduce/*," + + "$YARN_HOME/share/hadoop/mapreduce/lib/*"; + /** Container temp directory */ public static final String DEFAULT_CONTAINER_TEMP_DIR = "./tmp"; diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml index 6e8df109dd4..ba570c3e5df 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/yarn-default.xml @@ -538,16 +538,9 @@ - Classpath for typical applications. + CLASSPATH for YARN applications. A comma-separated list + of CLASSPATH entries yarn.application.classpath - - $HADOOP_CONF_DIR, - $HADOOP_COMMON_HOME/share/hadoop/common/*, - $HADOOP_COMMON_HOME/share/hadoop/common/lib/*, - $HADOOP_HDFS_HOME/share/hadoop/hdfs/*, - $HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*, - $YARN_HOME/share/hadoop/mapreduce/*, - $YARN_HOME/share/hadoop/mapreduce/lib/* - + $HADOOP_CONF_DIR,$HADOOP_COMMON_HOME/share/hadoop/common/*,$HADOOP_COMMON_HOME/share/hadoop/common/lib/*,$HADOOP_HDFS_HOME/share/hadoop/hdfs/*,$HADOOP_HDFS_HOME/share/hadoop/hdfs/lib/*,$YARN_HOME/share/hadoop/mapreduce/*,$YARN_HOME/share/hadoop/mapreduce/lib/*