Repository: hadoop Updated Branches: refs/heads/branch-2 f22ce96b5 -> f74364e8b
HDFS-9871. "Bytes Being Moved" -ve(-1 B) when cluster was already balanced. (Contributed by Brahma Reddy Battulla) (cherry picked from commit 1f004b3367c57de9e8a67040a57efc31c9ba8ee2) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/f74364e8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/f74364e8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/f74364e8 Branch: refs/heads/branch-2 Commit: f74364e8b9423f2cd923097a3b30fbd925c70d19 Parents: f22ce96 Author: Vinayakumar B <vinayakum...@apache.org> Authored: Tue Mar 29 11:25:41 2016 +0800 Committer: Vinayakumar B <vinayakum...@apache.org> Committed: Tue Mar 29 11:28:10 2016 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/f74364e8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java ---------------------------------------------------------------------- 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 3a6e958..e3a1beb 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 @@ -578,7 +578,7 @@ public class Balancer { final long bytesLeftToMove = init(reports); if (bytesLeftToMove == 0) { System.out.println("The cluster is balanced. Exiting..."); - return newResult(ExitStatus.SUCCESS, bytesLeftToMove, -1); + return newResult(ExitStatus.SUCCESS, bytesLeftToMove, 0); } else { LOG.info( "Need to move "+ StringUtils.byteDesc(bytesLeftToMove) + " to make the cluster balanced." );