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
This commit is contained in:
parent
068556b9e0
commit
4cb7a4854d
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue