From 06d7d9ab37c238a0183776c42f91c79216129d3a Mon Sep 17 00:00:00 2001
From: Todd Lipcon <todd@cloudera.com>
Date: Thu, 21 Jan 2010 15:23:16 -0800
Subject: [PATCH] HADOOP-5647. TestJobHistory fails if /tmp/_logs is not writable to

This fix is scoped to the test only, and reduces spurious test failures
on shared QA machines.
---
 .../org/apache/hadoop/mapred/TestJobHistory.java   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/org/apache/hadoop/mapred/TestJobHistory.java b/src/test/org/apache/hadoop/mapred/TestJobHistory.java
index f2561a4..f59f28c 100644
--- a/src/test/org/apache/hadoop/mapred/TestJobHistory.java
+++ b/src/test/org/apache/hadoop/mapred/TestJobHistory.java
@@ -51,7 +51,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
@@ -1049,7 +1049,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 {
@@ -1079,7 +1079,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);
 
-- 
1.6.0.4

