Browse Source

HADOOP-5647. Fix TestJobHistory to not depend on /tmp. Contributed by Ravi Gummadi.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@765898 13f79535-47bb-0310-9956-ffa450edef68
Sharad Agarwal 16 năm trước cách đây
mục cha
commit
e8da9e2d9c
2 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 3 0
      CHANGES.txt
  2. 3 3
      src/test/org/apache/hadoop/mapred/TestJobHistory.java

+ 3 - 0
CHANGES.txt

@@ -409,6 +409,9 @@ Trunk (unreleased changes)
     HADOOP-5533. Recovery duration shown on the jobtracker webpage is 
     inaccurate. (Amar Kamat via sharad)
 
+    HADOOP-5647. Fix TestJobHistory to not depend on /tmp. (Ravi Gummadi 
+    via sharad)
+
 Release 0.20.0 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 3 - 3
src/test/org/apache/hadoop/mapred/TestJobHistory.java

@@ -48,7 +48,7 @@ import org.apache.commons.logging.LogFactory;
  *
  * testJobHistoryUserLogLocation
  * Run jobs with the given values of hadoop.job.history.user.location as
- *   (1)null(default case), (2)"none", and (3)some dir like "/tmp".
+ *   (1)null(default case), (2)"none", and (3)some user specified dir.
  *   Validate user history file location in each case.
  *
  * testJobHistoryJobStatus
@@ -874,7 +874,7 @@ public class TestJobHistory extends TestCase {
 
   // Validate user history file location for the given values of
   // hadoop.job.history.user.location as
-  // (1)null(default case), (2)"none", and (3)some dir "/tmp"
+  // (1)null(default case), (2)"none", and (3)some user specified dir.
   public void testJobHistoryUserLogLocation() throws IOException {
     MiniMRCluster mr = null;
     try {
@@ -904,7 +904,7 @@ public class TestJobHistory extends TestCase {
       inDir = new Path(TEST_ROOT_DIR + "/succeed/input3");
       outDir = new Path(TEST_ROOT_DIR + "/succeed/output3");
       // validate for the case of any dir
-      conf.set("hadoop.job.history.user.location", "/tmp");
+      conf.set("hadoop.job.history.user.location", TEST_ROOT_DIR + "/succeed");
       job = UtilsForTests.runJobSucceed(conf, inDir, outDir);
       validateJobHistoryUserLogLocation(job.getID(), conf);