Browse Source

MAPREDUCE-3709. TestDistributedShell is failing. (Hitesh Shah via mahadev) - Merging r1241325 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1241327 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 13 years ago
parent
commit
46514fd253

+ 4 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -691,9 +691,13 @@ Release 0.23.1 - Unreleased
     MAPREDUCE-3697. Support binary compatibility for Counters after
     MAPREDUCE-3697. Support binary compatibility for Counters after
     MAPREDUCE-901. (mahadev via acmurthy) 
     MAPREDUCE-901. (mahadev via acmurthy) 
 
 
+  
     MAPREDUCE-3817. Fixed bin/mapred to allow running of distcp and archive
     MAPREDUCE-3817. Fixed bin/mapred to allow running of distcp and archive
     jobs. (Arpit Gupta via acmurthy) 
     jobs. (Arpit Gupta via acmurthy) 
 
 
+    MAPREDUCE-3709. TestDistributedShell is failing. (Hitesh Shah via 
+    mahadev)
+ 
 Release 0.23.0 - 2011-11-01 
 Release 0.23.0 - 2011-11-01 
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 1 - 0
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/pom.xml

@@ -104,6 +104,7 @@
         <configuration>
         <configuration>
           <environmentVariables>
           <environmentVariables>
             <JAVA_HOME>${java.home}</JAVA_HOME>
             <JAVA_HOME>${java.home}</JAVA_HOME>
+            <MALLOC_ARENA_MAX>4</MALLOC_ARENA_MAX>
           </environmentVariables>
           </environmentVariables>
        </configuration>
        </configuration>
       </plugin>
       </plugin>

+ 2 - 0
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java

@@ -531,6 +531,8 @@ public class Client {
     // Set java executable command 
     // Set java executable command 
     LOG.info("Setting up app master command");
     LOG.info("Setting up app master command");
     vargs.add("${JAVA_HOME}" + "/bin/java");
     vargs.add("${JAVA_HOME}" + "/bin/java");
+    // Set Xmx based on am memory size
+    vargs.add("-Xmx" + amMemory + "m");
     // Set class name 
     // Set class name 
     vargs.add(appMasterMainClass);
     vargs.add(appMasterMainClass);
     // Set params for Application Master
     // Set params for Application Master

+ 3 - 2
hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java

@@ -42,6 +42,7 @@ public class TestDistributedShell {
   @BeforeClass
   @BeforeClass
   public static void setup() throws InterruptedException, IOException {
   public static void setup() throws InterruptedException, IOException {
     LOG.info("Starting up YARN cluster");
     LOG.info("Starting up YARN cluster");
+    conf.setInt("yarn.scheduler.fifo.minimum-allocation-mb", 128);
     if (yarnCluster == null) {
     if (yarnCluster == null) {
       yarnCluster = new MiniYARNCluster(TestDistributedShell.class.getName(),
       yarnCluster = new MiniYARNCluster(TestDistributedShell.class.getName(),
           1, 1, 1);
           1, 1, 1);
@@ -74,9 +75,9 @@ public class TestDistributedShell {
         "--shell_command",
         "--shell_command",
         "ls",
         "ls",
         "--master_memory",
         "--master_memory",
-        "1536",
+        "512",
         "--container_memory",
         "--container_memory",
-        "1536"				
+        "128"
     };
     };
 
 
     LOG.info("Initializing DS Client");
     LOG.info("Initializing DS Client");