Jelajahi Sumber

MAPREDUCE-2575. TestMiniMRDFSCaching fails if test.build.dir is set to something other than build/test (Thomas Graves via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1150533 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar 14 tahun lalu
induk
melakukan
00b526a146

+ 3 - 0
mapreduce/CHANGES.txt

@@ -347,6 +347,9 @@ Trunk (unreleased changes)
     MAPREDUCE-2409. DistributedCache maps files and archives to the same path,
     despite semantic incompatibility. (Siddharth Seth via cdouglas)
 
+    MAPREDUCE-2575. TestMiniMRDFSCaching fails if test.build.dir is set 
+    to something other than build/test (Thomas Graves via mahadev)
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

+ 1 - 1
mapreduce/src/test/mapred/org/apache/hadoop/mapred/MRCaching.java

@@ -191,7 +191,7 @@ public class MRCaching {
 
   static void setupCache(String cacheDir, FileSystem fs) 
   throws IOException {
-    Path localPath = new Path("build/test/cache");
+    Path localPath = new Path(System.getProperty("test.cache.data", "build/test/cache"));
     Path txtPath = new Path(localPath, new Path("test.txt"));
     Path jarPath = new Path(localPath, new Path("test.jar"));
     Path zipPath = new Path(localPath, new Path("test.zip"));