clarax commented on a change in pull request #3729:
URL: https://github.com/apache/hbase/pull/3729#discussion_r724439130



##########
File path: 
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -310,14 +310,7 @@ void updateMetricsSize(int size) {
 
   private boolean areSomeRegionReplicasColocated(BalancerClusterState c) {
     regionReplicaHostCostFunction.prepare(c);
-    if (Math.abs(regionReplicaHostCostFunction.cost()) > 
CostFunction.COST_EPSILON) {
-      return true;
-    }
-    regionReplicaRackCostFunction.prepare(c);
-    if (Math.abs(regionReplicaRackCostFunction.cost()) > 
CostFunction.COST_EPSILON) {
-      return true;
-    }
-    return false;
+    return (Math.abs(regionReplicaHostCostFunction.cost()) > 
CostFunction.COST_EPSILON);

Review comment:
       We no longer force balancer to run if there are still cohosted replicas 
on racks:
   1. there are cases it cannot be satisfied 
   2. there are cases we have to accept it as a compromise to have better 
region count distribution.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to