merge -c r1460064 from trunk to branch-2 for YARN-417. Addendum patch (Sandy Ryza via bikas)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1460065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9fbf4dedb4
commit
67250d7a00
|
@ -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