浏览代码

HDFS-1240. svn merge -c 1032810 from branch-0.20.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-append@1032811 13f79535-47bb-0310-9956-ffa450edef68
Eli Collins 14 年之前
父节点
当前提交
73dddb17d0

+ 3 - 0
CHANGES.txt

@@ -124,6 +124,9 @@ Release 0.20.3 - Unreleased
     HDFS-1258. Clearing namespace quota on "/" corrupts fs image.
     (Aaron T. Myers via szetszwo)
 
+    HDFS-1240. TestDFSShell failing in branch-20.
+    (Todd Lipcon via Eli Collins)
+
   IMPROVEMENTS
 
     MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match

+ 6 - 4
src/test/org/apache/hadoop/hdfs/MiniDFSCluster.java

@@ -52,9 +52,6 @@ import org.apache.hadoop.util.ToolRunner;
  */
 public class MiniDFSCluster {
 
-  public static final File BASE_DIR =
-    new File(System.getProperty("test.build.data", "build/test/data"), "dfs/");
-  
   public class DataNodeProperties {
     DataNode datanode;
     Configuration conf;
@@ -243,7 +240,7 @@ public class MiniDFSCluster {
       ioe.initCause(e);
       throw ioe;
     }
-    base_dir = BASE_DIR;
+    base_dir = getBaseDir();
     data_dir = new File(base_dir, "data");
     
     // Setup the NameNode configuration
@@ -907,4 +904,9 @@ public class MiniDFSCluster {
   public String getDataDirectory() {
     return data_dir.getAbsolutePath();
   }
+
+  public static File getBaseDir() {
+    return new File(System.getProperty(
+      "test.build.data", "build/test/data"), "dfs/");
+  }
 }

+ 1 - 1
src/test/org/apache/hadoop/hdfs/server/namenode/TestEditLogRace.java

@@ -287,7 +287,7 @@ public class TestEditLogRace extends TestCase {
  
   private Configuration getConf() {
     Configuration conf = new Configuration();
-    conf.set("dfs.name.dir", MiniDFSCluster.BASE_DIR + "/data");
+    conf.set("dfs.name.dir", MiniDFSCluster.getBaseDir() + "/data");
     conf.setBoolean("dfs.permissions", false);
     return conf;
   }