فهرست منبع

HADOOP-3372. Fix heap management in streaming tests. Contributed by Arun Murthy.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.17@655590 13f79535-47bb-0310-9956-ffa450edef68
Christopher Douglas 17 سال پیش
والد
کامیت
78c934cbb8

+ 3 - 0
CHANGES.txt

@@ -579,6 +579,9 @@ Release 0.17.0 - Unreleased
     HADOOP-3285. Fix input split locality when the splits align to
     fs blocks. (omalley)
 
+    HADOOP-3372. Fix heap management in streaming tests. (Arun Murthy via
+    cdouglas)
+
 Release 0.16.4 - 2008-05-05
 
   BUG FIXES

+ 1 - 1
src/contrib/build-contrib.xml

@@ -193,7 +193,7 @@
     <mkdir dir="${hadoop.log.dir}"/>
     <junit
       printsummary="yes" showoutput="${test.output}" 
-      haltonfailure="no" fork="yes" maxmemory="1280m"
+      haltonfailure="no" fork="yes" maxmemory="256m"
       errorProperty="tests.failed" failureProperty="tests.failed"
       timeout="${test.timeout}">
       

+ 3 - 0
src/contrib/streaming/src/java/org/apache/hadoop/streaming/StreamUtil.java

@@ -385,6 +385,9 @@ public class StreamUtil {
     vargs.add("-classpath");
     vargs.add("\"" + System.getProperty("java.class.path") + "\"");
 
+    // add heap-size limit
+    vargs.add("-Xmx" + Runtime.getRuntime().maxMemory());
+
     // Add main class and its arguments
     vargs.add(main.getName());
     for (int i = 0; i < argv.length; i++) {

+ 0 - 5
src/contrib/streaming/src/test/org/apache/hadoop/streaming/TestStreamingExitStatus.java

@@ -65,11 +65,6 @@ public class TestStreamingExitStatus extends TestCase
     out.close();
   }
 
-  public void tearDown() {
-    UtilTest.recursiveDelete(INPUT_FILE);
-    UtilTest.recursiveDelete(OUTPUT_DIR);    
-  }
-  
   public void runStreamJob(boolean exitStatusIsFailure, boolean failMap) {
     try {
       boolean mayExit = false;