HBASE-18765 The value of balancerRan is true even though no plans are executed
This commit is contained in:
parent
5847c901a7
commit
e69b05d109
|
@ -492,7 +492,6 @@ public class RSGroupAdminServer implements RSGroupAdmin {
|
|||
AssignmentManager assignmentManager = master.getAssignmentManager();
|
||||
LoadBalancer balancer = master.getLoadBalancer();
|
||||
|
||||
boolean balancerRan;
|
||||
synchronized (balancer) {
|
||||
// If balance not true, don't run balancer.
|
||||
if (!((HMaster) master).isBalancerOn()) return false;
|
||||
|
@ -530,8 +529,8 @@ public class RSGroupAdminServer implements RSGroupAdmin {
|
|||
}
|
||||
}
|
||||
long startTime = System.currentTimeMillis();
|
||||
balancerRan = plans != null;
|
||||
if (plans != null && !plans.isEmpty()) {
|
||||
boolean balancerRan = !plans.isEmpty();
|
||||
if (balancerRan) {
|
||||
LOG.info("RSGroup balance " + groupName + " starting with plan count: " + plans.size());
|
||||
for (RegionPlan plan: plans) {
|
||||
LOG.info("balance " + plan);
|
||||
|
@ -543,8 +542,8 @@ public class RSGroupAdminServer implements RSGroupAdmin {
|
|||
if (master.getMasterCoprocessorHost() != null) {
|
||||
master.getMasterCoprocessorHost().postBalanceRSGroup(groupName, balancerRan);
|
||||
}
|
||||
return balancerRan;
|
||||
}
|
||||
return balancerRan;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue