Repository: hadoop Updated Branches: refs/heads/branch-2 c7fe1f5ec -> 5004b0571
In Balancer, the target task should be removed when its size < 0. Contributed by Yiqun Lin Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5004b057 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5004b057 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5004b057 Branch: refs/heads/branch-2 Commit: 5004b0571e65f16b3913d57abdb63a0b7d8d09fe Parents: c7fe1f5 Author: Tsz-Wo Nicholas Sze <[email protected]> Authored: Thu Aug 4 09:45:40 2016 -0700 Committer: Tsz-Wo Nicholas Sze <[email protected]> Committed: Thu Aug 4 09:53:15 2016 -0700 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/5004b057/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java ---------------------------------------------------------------------- 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 8f81c19..9bf549a 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; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
