hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r723220 - in /hadoop/core/branches/branch-0.19: CHANGES.txt src/test/org/apache/hadoop/mapred/TestJobHistoryVersion.java
Date Thu, 04 Dec 2008 06:07:27 GMT
Author: cdouglas
Date: Wed Dec  3 22:07:27 2008
New Revision: 723220

URL: http://svn.apache.org/viewvc?rev=723220&view=rev
Log:
HADOOP-4632. Fix TestJobHistoryVersion to use test.build.dir instead of the
current workding directory for scratch space. Contributed by Amar Kamat.

Modified:
    hadoop/core/branches/branch-0.19/CHANGES.txt
    hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/TestJobHistoryVersion.java

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=723220&r1=723219&r2=723220&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Wed Dec  3 22:07:27 2008
@@ -15,6 +15,9 @@
     HADOOP-4420. Add null checks for job, caused by invalid job IDs.
     (Aaron Kimball via tomwhite)
 
+    HADOOP-4632. Fix TestJobHistoryVersion to use test.build.dir instead of the
+    current workding directory for scratch space. (Amar Kamat via cdouglas)
+
 Release 0.19.0 - 2008-11-18
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/TestJobHistoryVersion.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/TestJobHistoryVersion.java?rev=723220&r1=723219&r2=723220&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/TestJobHistoryVersion.java
(original)
+++ hadoop/core/branches/branch-0.19/src/test/org/apache/hadoop/mapred/TestJobHistoryVersion.java
Wed Dec  3 22:07:27 2008
@@ -43,7 +43,9 @@
     + "Map-Reduce Framework.Map input records:0,"
     + "Map-Reduce Framework.Map input bytes:0,"
     + "File Systems.HDFS bytes written:0,";
-  private static final String TEST_DIR = "test-history-version";
+  private static final Path TEST_DIR = 
+    new Path(System.getProperty("test.build.data", "/tmp"), 
+             "test-history-version");
   private static final String DELIM = ".";
   
   
@@ -115,6 +117,9 @@
     JobConf conf = new JobConf();
     FileSystem fs = FileSystem.getLocal(conf);
     
+    // cleanup
+    fs.delete(TEST_DIR, true);
+    
     Path historyPath = new Path(TEST_DIR + "/_logs/history/" + FILENAME);
     
     fs.delete(historyPath, false);
@@ -128,6 +133,9 @@
     
     assertTrue("Failed to parse old jobhistory files", 
                job.getAllTasks().size() > 0);
+    
+    // cleanup
+    fs.delete(TEST_DIR, true);
   }
   
   /**
@@ -137,6 +145,9 @@
     JobConf conf = new JobConf();
     FileSystem fs = FileSystem.getLocal(conf);
     
+    // cleanup
+    fs.delete(TEST_DIR, true);
+    
     Path historyPath = new Path(TEST_DIR + "/_logs/history/" + FILENAME);
     
     fs.delete(historyPath, false);
@@ -150,5 +161,8 @@
     
     assertTrue("Failed to parse old jobhistory files", 
                job.getAllTasks().size() > 0);
+    
+    // cleanup
+    fs.delete(TEST_DIR, true);
   }
 }



Mime
View raw message