YARN-417. Addendum patch to fix broken test (Sandy Ryza via bikas)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1460064 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b15b44e722
commit
7c325a5d71
|
@ -394,6 +394,10 @@ public class ApplicationMaster {
|
||||||
"container_memory", "10"));
|
"container_memory", "10"));
|
||||||
numTotalContainers = Integer.parseInt(cliParser.getOptionValue(
|
numTotalContainers = Integer.parseInt(cliParser.getOptionValue(
|
||||||
"num_containers", "1"));
|
"num_containers", "1"));
|
||||||
|
if (numTotalContainers == 0) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Cannot run distributed shell with no containers");
|
||||||
|
}
|
||||||
requestPriority = Integer.parseInt(cliParser
|
requestPriority = Integer.parseInt(cliParser
|
||||||
.getOptionValue("priority", "0"));
|
.getOptionValue("priority", "0"));
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class TestUnmanagedAMLauncher {
|
||||||
return envClassPath;
|
return envClassPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(timeout=10000)
|
||||||
public void testDSShell() throws Exception {
|
public void testDSShell() throws Exception {
|
||||||
String classpath = getTestRuntimeClasspath();
|
String classpath = getTestRuntimeClasspath();
|
||||||
String javaHome = System.getenv("JAVA_HOME");
|
String javaHome = System.getenv("JAVA_HOME");
|
||||||
|
@ -110,7 +110,7 @@ public class TestUnmanagedAMLauncher {
|
||||||
javaHome
|
javaHome
|
||||||
+ "/bin/java -Xmx512m "
|
+ "/bin/java -Xmx512m "
|
||||||
+ "org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster "
|
+ "org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster "
|
||||||
+ "--container_memory 128 --num_containers 0 --priority 0 --shell_command ls" };
|
+ "--container_memory 128 --num_containers 1 --priority 0 --shell_command ls" };
|
||||||
|
|
||||||
LOG.info("Initializing Launcher");
|
LOG.info("Initializing Launcher");
|
||||||
UnmanagedAMLauncher launcher = new UnmanagedAMLauncher(new Configuration(
|
UnmanagedAMLauncher launcher = new UnmanagedAMLauncher(new Configuration(
|
||||||
|
|
Loading…
Reference in New Issue