HDFS-6364. Incorrect check for unknown datanode in Balancer. (Contributed by Benoy Antony)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1601771 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arpit Agarwal 2014-06-10 21:02:47 +00:00
parent 6480fdfd33
commit c802ca28fd
2 changed files with 4 additions and 1 deletions

View File

@ -666,6 +666,9 @@ Release 2.5.0 - UNRELEASED
HDFS-6257. TestCacheDirectives#testExceedsCapacity fails occasionally HDFS-6257. TestCacheDirectives#testExceedsCapacity fails occasionally
(cmccabe) (cmccabe)
HDFS-6364. Incorrect check for unknown datanode in Balancer. (Benoy
Antony via Arpit Agarwal)
Release 2.4.1 - UNRELEASED Release 2.4.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -696,7 +696,7 @@ public class Balancer {
// update locations // update locations
for (String datanodeUuid : blk.getDatanodeUuids()) { for (String datanodeUuid : blk.getDatanodeUuids()) {
final BalancerDatanode d = datanodeMap.get(datanodeUuid); final BalancerDatanode d = datanodeMap.get(datanodeUuid);
if (datanode != null) { // not an unknown datanode if (d != null) { // not an unknown datanode
block.addLocation(d); block.addLocation(d);
} }
} }