MAPREDUCE-4098. TestMRApps testSetClasspath fails (tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1309432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d99c2958dd
commit
da1b01c9e3
@ -198,6 +198,8 @@ Release 2.0.0 - UNRELEASED
|
||||
MAPREDUCE-4095. TestJobInProgress#testLocality uses a bogus topology.
|
||||
(Colin Patrick McCabe via eli)
|
||||
|
||||
MAPREDUCE-4098. TestMRApps testSetClasspath fails (tucu)
|
||||
|
||||
Release 0.23.3 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -33,6 +33,7 @@
|
||||
import org.apache.hadoop.mapreduce.v2.util.MRApps;
|
||||
import org.apache.hadoop.yarn.YarnException;
|
||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
||||
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
|
||||
|
||||
import org.junit.Test;
|
||||
@ -130,15 +131,12 @@ public class TestMRApps {
|
||||
Job job = Job.getInstance();
|
||||
Map<String, String> environment = new HashMap<String, String>();
|
||||
MRApps.setClasspath(environment, job.getConfiguration());
|
||||
assertEquals("$PWD:$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/*:" +
|
||||
"job.jar:$PWD/*",
|
||||
environment.get("CLASSPATH"));
|
||||
assertTrue(environment.get("CLASSPATH").startsWith("$PWD:"));
|
||||
String confClasspath = job.getConfiguration().get(YarnConfiguration.YARN_APPLICATION_CLASSPATH);
|
||||
if (confClasspath != null) {
|
||||
confClasspath = confClasspath.replaceAll(",\\s*", ":").trim();
|
||||
}
|
||||
assertTrue(environment.get("CLASSPATH").contains(confClasspath));
|
||||
}
|
||||
|
||||
@Test public void testSetClasspathWithUserPrecendence() {
|
||||
|
Loading…
Reference in New Issue
Block a user