Forráskód Böngészése

HADOOP-1456. Fix TestDecommission assertion failure by setting the namenode to ignore the load on datanodes while allocating replicas. Contributed by Dhruba Borthakur.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@547017 13f79535-47bb-0310-9956-ffa450edef68
Thomas White 18 éve
szülő
commit
0d149e3d87
2 módosított fájl, 8 hozzáadás és 3 törlés
  1. 4 0
      CHANGES.txt
  2. 4 3
      src/test/org/apache/hadoop/dfs/TestDecommission.java

+ 4 - 0
CHANGES.txt

@@ -107,6 +107,10 @@ Trunk (unreleased changes)
  34. HADOOP-1447.  Add support in contrib/data_join for text inputs.
      (Senthil Subramanian via cutting)
 
+ 35. HADOOP-1456.  Fix TestDecommission assertion failure by setting
+     the namenode to ignore the load on datanodes while allocating
+     replicas.  (Dhruba Borthakur via tomwhite)
+
 
 Release 0.13.0 - 2007-06-08
 

+ 4 - 3
src/test/org/apache/hadoop/dfs/TestDecommission.java

@@ -127,13 +127,13 @@ public class TestDecommission extends TestCase {
       for (int j = 0; j < nodes.length; j++) {     // for each replica
         if (nodes[j].getName().equals(downnode)) {
           hasdown++;
-          System.out.println("Block " + blk + " replica " +
+          System.out.println("Block " + blk.getBlock() + " replica " +
                              nodes[j].getName() + " is decommissioned.");
         }
       }
-      System.out.println("Block " + blk + " has " + hasdown +
+      System.out.println("Block " + blk.getBlock() + " has " + hasdown +
                          " decommissioned replica.");
-      assertEquals("Number of replicas for block" + blk,
+      assertEquals("Number of replicas for block" + blk.getBlock(),
                    Math.min(numDatanodes, repl+hasdown), nodes.length);  
     }
   }
@@ -251,6 +251,7 @@ public class TestDecommission extends TestCase {
    */
   public void testDecommission() throws IOException {
     Configuration conf = new Configuration();
+    conf.setBoolean("dfs.replication.considerLoad", false);
 
     // Set up the hosts/exclude files.
     FileSystem localFileSys = FileSystem.getLocal(conf);