浏览代码

HADOOP-2363. This fix allows running multiple instances of the unit test
in parallel. The bug was introduced in HADOOP-2185 that changed
port-rolling behaviour. (Konstantin Shvachko via dhruba)



git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@602002 13f79535-47bb-0310-9956-ffa450edef68

Dhruba Borthakur 17 年之前
父节点
当前提交
b8b6cf98fd

+ 4 - 0
CHANGES.txt

@@ -211,6 +211,10 @@ Trunk (unreleased changes)
     HADOOP-2368.  Fix unit tests on Windows.
     (Tsz Wo (Nicholas), SZE via dhruba)
 
+    HADOOP-2363.  This fix allows running multiple instances of the unit test
+    in parallel. The bug was introduced in HADOOP-2185 that changed
+    port-rolling behaviour.  (Konstantin Shvachko via dhruba)
+
 Branch 0.15 (unreleased)
 
   BUG FIXES

+ 1 - 1
src/test/org/apache/hadoop/dfs/MiniDFSCluster.java

@@ -152,7 +152,7 @@ public class MiniDFSCluster {
     
     // Setup the NameNode configuration
     conf.set("fs.default.name", "localhost:"+ Integer.toString(nameNodePort));
-    conf.get("dfs.http.bindAddress", "0.0.0.0:0");
+    conf.set("dfs.http.bindAddress", "0.0.0.0:0");  
     if (manageDfsDirs) {
       conf.set("dfs.name.dir", new File(base_dir, "name1").getPath()+","+
                new File(base_dir, "name2").getPath());

+ 1 - 0
src/test/org/apache/hadoop/dfs/TestCheckpoint.java

@@ -331,6 +331,7 @@ public class TestCheckpoint extends TestCase {
     Collection<File> namedirs = null;
 
     Configuration conf = new Configuration();
+    conf.set("dfs.secondary.http.bindAddress", "0.0.0.0:0");
     replication = (short)conf.getInt("dfs.replication", 3);  
     MiniDFSCluster cluster = new MiniDFSCluster(conf, numDatanodes, true, null);
     cluster.waitActive();