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
|
||||
|
||||
MAPREDUCE-4422. YARN_APPLICATION_CLASSPATH needs a documented default value in
|
||||
YarnConfiguration. (ahmed via tucu)
|
||||
|
||||
Release 2.1.0-alpha - Unreleased
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -171,8 +171,9 @@ public class MRApps extends Apps {
|
|||
}
|
||||
|
||||
// Add standard Hadoop classes
|
||||
for (String c : conf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH)
|
||||
.split(",")) {
|
||||
for (String c : conf.getStrings(
|
||||
YarnConfiguration.YARN_APPLICATION_CLASSPATH,
|
||||
YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH)) {
|
||||
Apps.addToEnvironment(environment, Environment.CLASSPATH.name(), c
|
||||
.trim());
|
||||
}
|
||||
|
|
|
@ -508,8 +508,9 @@ public class Client {
|
|||
// For now setting all required classpaths including
|
||||
// the classpath to "." for the application jar
|
||||
StringBuilder classPathEnv = new StringBuilder("${CLASSPATH}:./*");
|
||||
for (String c : conf.get(YarnConfiguration.YARN_APPLICATION_CLASSPATH)
|
||||
.split(",")) {
|
||||
for (String c : conf.getStrings(
|
||||
YarnConfiguration.YARN_APPLICATION_CLASSPATH,
|
||||
YarnConfiguration.DEFAULT_YARN_APPLICATION_CLASSPATH)) {
|
||||
classPathEnv.append(':');
|
||||
classPathEnv.append(c.trim());
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -538,16 +538,9 @@
|
|||
</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>
|
||||
<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>
|
||||
<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>
|
||||
</configuration>
|
||||
|
|
Loading…
Reference in New Issue