MAPREDUCE-4422. YARN_APPLICATION_CLASSPATH needs a documented default value in YarnConfiguration. (ahmed via tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1362722 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e9aa5aac68
commit
2e00d28f14
@ -136,6 +136,9 @@ Branch-2 ( Unreleased changes )
|
|||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
MAPREDUCE-4422. YARN_APPLICATION_CLASSPATH needs a documented default value in
|
||||||
|
YarnConfiguration. (ahmed via tucu)
|
||||||
|
|
||||||
Release 2.1.0-alpha - Unreleased
|
Release 2.1.0-alpha - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -171,8 +171,9 @@ private static void setMRFrameworkClasspath(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add standard Hadoop classes
|
// Add standard Hadoop classes
|
||||||
for (String c : conf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH)
|
for (String c : conf.getStrings(
|
||||||
.split(",")) {
|
YarnConfiguration.YARN_APPLICATION_CLASSPATH,
|
||||||
|
YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH)) {
|
||||||
Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), c
|
Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), c
|
||||||
.trim());
|
.trim());
|
||||||
}
|
}
|
||||||
|
@ -508,8 +508,9 @@ else if (amMemory > maxMem) {
|
|||||||
// For now setting all required classpaths including
|
// For now setting all required classpaths including
|
||||||
// the classpath to "." for the application jar
|
// the classpath to "." for the application jar
|
||||||
StringBuilder classPathEnv = new StringBuilder("${CLASSPATH}:./*");
|
StringBuilder classPathEnv = new StringBuilder("${CLASSPATH}:./*");
|
||||||
for (String c : conf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH)
|
for (String c : conf.getStrings(
|
||||||
.split(",")) {
|
YarnConfiguration.YARN_APPLICATION_CLASSPATH,
|
||||||
|
YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH)) {
|
||||||
classPathEnv.append(':');
|
classPathEnv.append(':');
|
||||||
classPathEnv.append(c.trim());
|
classPathEnv.append(c.trim());
|
||||||
}
|
}
|
||||||
|
@ -541,10 +541,25 @@ public class YarnConfiguration extends Configuration {
|
|||||||
public static final long DEFAULT_NM_PROCESS_KILL_WAIT_MS =
|
public static final long DEFAULT_NM_PROCESS_KILL_WAIT_MS =
|
||||||
2000;
|
2000;
|
||||||
|
|
||||||
/** Standard Hadoop classes */
|
/**
|
||||||
|
* CLASSPATH for YARN applications. A comma-separated list of CLASSPATH
|
||||||
|
* entries
|
||||||
|
*/
|
||||||
public static final String YARN_APPLICATION_CLASSPATH = YARN_PREFIX
|
public static final String YARN_APPLICATION_CLASSPATH = YARN_PREFIX
|
||||||
+ "application.classpath";
|
+ "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 */
|
/** Container temp directory */
|
||||||
public static final String DEFAULT_CONTAINER_TEMP_DIR = "./tmp";
|
public static final String DEFAULT_CONTAINER_TEMP_DIR = "./tmp";
|
||||||
|
|
||||||
|
@ -538,16 +538,9 @@
|
|||||||
</property>
|
</property>
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<description>Classpath for typical applications.</description>
|
<description>CLASSPATH for YARN applications. A comma-separated list
|
||||||
|
of CLASSPATH entries</description>
|
||||||
<name>yarn.application.classpath</name>
|
<name>yarn.application.classpath</name>
|
||||||
<value>
|
<value>$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/*</value>
|
||||||
$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/*
|
|
||||||
</value>
|
|
||||||
</property>
|
</property>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user