HDFS-9871. "Bytes Being Moved" -ve(-1 B) when cluster was already balanced. (Contributed by Brahma Reddy Battulla)

(cherry picked from commit 1f004b3367)
(cherry picked from commit f74364e8b9)
This commit is contained in:
Vinayakumar B 2016-03-29 11:25:41 +08:00
parent 35f9cfda61
commit 88b56cdfaa
1 changed files with 1 additions and 1 deletions

View File

@ -578,7 +578,7 @@ public class Balancer {
final long bytesLeftToMove = init(reports); final long bytesLeftToMove = init(reports);
if (bytesLeftToMove == 0) { if (bytesLeftToMove == 0) {
System.out.println("The cluster is balanced. Exiting..."); System.out.println("The cluster is balanced. Exiting...");
return newResult(ExitStatus.SUCCESS, bytesLeftToMove, -1); return newResult(ExitStatus.SUCCESS, bytesLeftToMove, 0);
} else { } else {
LOG.info( "Need to move "+ StringUtils.byteDesc(bytesLeftToMove) LOG.info( "Need to move "+ StringUtils.byteDesc(bytesLeftToMove)
+ " to make the cluster balanced." ); + " to make the cluster balanced." );