فهرست منبع

HDFS-2012. Balancer incorrectly treats nodes whose utilization equals avgUtilization. Contributed by Uma Maheswara Rao G.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1183457 13f79535-47bb-0310-9956-ffa450edef68
Konstantin Shvachko 13 سال پیش
والد
کامیت
4cb7a4854d

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -1733,6 +1733,9 @@ Release 0.22.0 - Unreleased
     HDFS-2290. Block with corrupt replica is not getting replicated.
     (Benoy Antony via shv)
 
+    HDFS-2012. Balancer incorrectly treats nodes whose utilization equals
+    avgUtilization. (Uma Maheswara Rao G via shv)
+
 Release 0.21.1 - Unreleased
 
     HDFS-1466. TestFcHdfsSymlink relies on /tmp/test not existing. (eli)

+ 2 - 2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

@@ -1261,12 +1261,12 @@ public class Balancer {
     return datanode.utilization > (policy.getAvgUtilization()+threshold);
   }
   
-  /* Return true if the given datanode is above average utilized
+  /* Return true if the given datanode is above or equal to average utilized
    * but not overUtilized */
   private boolean isAboveAvgUtilized(BalancerDatanode datanode) {
     final double avg = policy.getAvgUtilization();
     return (datanode.utilization <= (avg+threshold))
-        && (datanode.utilization > avg);
+        && (datanode.utilization >= avg);
   }
   
   /* Return true if the given datanode is underUtilized */