Bläddra i källkod

In Balancer, the target task should be removed when its size < 0. Contributed by Yiqun Lin

Tsz-Wo Nicholas Sze 8 år sedan
förälder
incheckning
5004b0571e

+ 1 - 1
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;