HBASE-10456 Balancer should not run if it's just turned off

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1564047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jxiang 2014-02-03 20:36:12 +00:00
parent 91749f9c93
commit d4355b91d5
1 changed files with 2 additions and 2 deletions

View File

@ -1432,12 +1432,12 @@ MasterServices, Server {
LOG.debug("Master has not been initialized, don't run balancer.");
return false;
}
// If balance not true, don't run balancer.
if (!this.loadBalancerTracker.isBalancerOn()) return false;
// Do this call outside of synchronized block.
int maximumBalanceTime = getBalancerCutoffTime();
boolean balancerRan;
synchronized (this.balancer) {
// If balance not true, don't run balancer.
if (!this.loadBalancerTracker.isBalancerOn()) return false;
// Only allow one balance run at at time.
if (this.assignmentManager.getRegionStates().isRegionsInTransition()) {
Map<String, RegionState> regionsInTransition =