Browse Source

MAPREDUCE-2817. MiniRMCluster hardcodes 'mapred.local.dir' configuration to 'build/test/mapred/local'. (rkanter via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1@1464221 13f79535-47bb-0310-9956-ffa450edef68
Alejandro Abdelnur 12 years ago
parent
commit
16959f74fb
2 changed files with 7 additions and 2 deletions
  1. 3 0
      CHANGES.txt
  2. 4 2
      src/test/org/apache/hadoop/mapred/MiniMRCluster.java

+ 3 - 0
CHANGES.txt

@@ -31,6 +31,9 @@ Release 1.3.0 - unreleased
     HDFS-4581. DataNode.checkDiskError should not be called on network errors.
     (Rohit Kochar via kihwal)
 
+    MAPREDUCE-2817. MiniRMCluster hardcodes 'mapred.local.dir' configuration 
+    to 'build/test/mapred/local'. (rkanter via tucu)
+
 Release 1.2.0 - unreleased
 
   INCOMPATIBLE CHANGES

+ 4 - 2
src/test/org/apache/hadoop/mapred/MiniMRCluster.java

@@ -100,8 +100,10 @@ public class MiniMRCluster {
     public void run() {
       try {
         jc = (jc == null) ? createJobConf() : createJobConf(jc);
-        File f = new File("build/test/mapred/local").getAbsoluteFile();
-        jc.set("mapred.local.dir",f.getAbsolutePath());
+        String localPath = System.getProperty("test.build.data",
+            "build/test/mapred/local");
+        File f = new File(localPath).getAbsoluteFile();
+        jc.set("mapred.local.dir", f.getAbsolutePath());
         jc.setClass("topology.node.switch.mapping.impl", 
             StaticMapping.class, DNSToSwitchMapping.class);
         final String id =