diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 4d58be45e1..8714d15787 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -666,6 +666,9 @@ Release 2.5.0 - UNRELEASED HDFS-6257. TestCacheDirectives#testExceedsCapacity fails occasionally (cmccabe) + HDFS-6364. Incorrect check for unknown datanode in Balancer. (Benoy + Antony via Arpit Agarwal) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java index 8061b05356..a9369010e1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java @@ -696,7 +696,7 @@ private long getBlockList() throws IOException { // update locations for (String datanodeUuid : blk.getDatanodeUuids()) { final BalancerDatanode d = datanodeMap.get(datanodeUuid); - if (datanode != null) { // not an unknown datanode + if (d != null) { // not an unknown datanode block.addLocation(d); } }