HBASE-6437 Avoid admin.balance during master initialize

Submitted by:rajesh
Reviewed by:	Ted


git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1377025 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ramkrishna 2012-08-24 18:35:52 +00:00
parent 59232d411f
commit 5f5f22e30d
1 changed files with 5 additions and 0 deletions

View File

@ -1229,6 +1229,11 @@ Server {
}
public boolean balance() {
// if master not initialized, don't run balancer.
if (!this.initialized) {
LOG.debug("Master has not been initialized, don't run balancer.");
return false;
}
// If balance not true, don't run balancer.
if (!this.balanceSwitch) return false;
// Do this call outside of synchronized block.