浏览代码

Fix stopContainer for setsid challenged platforms (llu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/MR-279@1136109 13f79535-47bb-0310-9956-ffa450edef68
Luke Lu 14 年之前
父节点
当前提交
57a4666809

+ 2 - 0
mapreduce/CHANGES.txt

@@ -5,6 +5,8 @@ Trunk (unreleased changes)
 
 
     MAPREDUCE-279
     MAPREDUCE-279
 
 
+    Fix stopContainer for setsid challenged platforms. (llu)
+
     Fix concurrent modification exception in the Capacity Scheduler (mahadev)
     Fix concurrent modification exception in the Capacity Scheduler (mahadev)
 
 
     Changes for invoking rack resolution in the RM and in the AM (ddas)
     Changes for invoking rack resolution in the RM and in the AM (ddas)

+ 1 - 0
mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/MapReduceChildJVM.java

@@ -164,6 +164,7 @@ public class MapReduceChildJVM {
 
 
     Vector<String> vargs = new Vector<String>(8);
     Vector<String> vargs = new Vector<String>(8);
 
 
+    vargs.add("exec");
     vargs.add(javaHome + "/bin/java");
     vargs.add(javaHome + "/bin/java");
 
 
     // Add child (task) java-vm options.
     // Add child (task) java-vm options.

+ 1 - 1
mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestContainerManager.java

@@ -177,7 +177,7 @@ public class TestContainerManager extends BaseContainerManagerTest {
     fileWriter.write("\numask 0"); // So that start file is readable by the test.
     fileWriter.write("\numask 0"); // So that start file is readable by the test.
     fileWriter.write("\necho Hello World! > " + processStartFile);
     fileWriter.write("\necho Hello World! > " + processStartFile);
     fileWriter.write("\necho $$ >> " + processStartFile);
     fileWriter.write("\necho $$ >> " + processStartFile);
-    fileWriter.write("\nsleep 100");
+    fileWriter.write("\nexec sleep 100");
     fileWriter.close();
     fileWriter.close();
 
 
     ContainerLaunchContext containerLaunchContext = recordFactory.newRecordInstance(ContainerLaunchContext.class);
     ContainerLaunchContext containerLaunchContext = recordFactory.newRecordInstance(ContainerLaunchContext.class);