hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r1044102 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Date Thu, 09 Dec 2010 19:28:49 GMT
Author: cos
Date: Thu Dec  9 19:28:49 2010
New Revision: 1044102

URL: http://svn.apache.org/viewvc?rev=1044102&view=rev
Log:
HDFS-613. TestBalancer and TestBlockTokenWithDFS fail Balancer assert. Contributed by Todd
Lipcon.

Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=1044102&r1=1044101&r2=1044102&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Thu Dec  9 19:28:49 2010
@@ -437,6 +437,9 @@ Release 0.22.0 - Unreleased
     HDFS-1531. Clean up stack traces due to duplicate MXBean registration.
     (Todd Lipcon via cos)
 
+    HDFS-613. TestBalancer and TestBlockTokenWithDFS fail Balancer assert.
+    (Todd Lipcon via cos)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java?rev=1044102&r1=1044101&r2=1044102&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java (original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java Thu Dec
 9 19:28:49 2010
@@ -1062,11 +1062,11 @@ public class Balancer implements Tool {
     // Then match nodes on different racks
     chooseNodes(false);
     
-    assert (datanodes.size() == 
-      overUtilizedDatanodes.size()+underUtilizedDatanodes.size()+
-      aboveAvgUtilizedDatanodes.size()+belowAvgUtilizedDatanodes.size()+
-      sources.size()+targets.size())
-      : "Mismatched number of datanodes";
+    assert (datanodes.size() >= sources.size()+targets.size())
+      : "Mismatched number of datanodes (" +
+      datanodes.size() + " total, " +
+      sources.size() + " sources, " +
+      targets.size() + " targets)";
 
     long bytesToMove = 0L;
     for (Source src : sources) {



Mime
View raw message