Skip to content

Commit 6dd0360

Browse files
committed
HBASE-26327 Replicas cohosted on a rack shouldn't keep triggering Balancer
1 parent 42fe5e5 commit 6dd0360

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,7 @@ void updateMetricsSize(int size) {
310310

311311
private boolean areSomeRegionReplicasColocated(BalancerClusterState c) {
312312
regionReplicaHostCostFunction.prepare(c);
313-
if (Math.abs(regionReplicaHostCostFunction.cost()) > CostFunction.COST_EPSILON) {
314-
return true;
315-
}
316-
regionReplicaRackCostFunction.prepare(c);
317-
if (Math.abs(regionReplicaRackCostFunction.cost()) > CostFunction.COST_EPSILON) {
318-
return true;
319-
}
320-
return false;
313+
return Math.abs(regionReplicaHostCostFunction.cost()) > CostFunction.COST_EPSILON);
321314
}
322315

323316
private String getBalanceReason(double total, double sumMultiplier) {

0 commit comments

Comments
 (0)