diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java index 8f81c19236c..9bf549a059b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java @@ -734,7 +734,7 @@ public class Dispatcher { long blockSize = pendingBlock.block.getNumBytes(); incScheduledSize(-blockSize); task.size -= blockSize; - if (task.size == 0) { + if (task.size <= 0) { i.remove(); } return pendingBlock;