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



##########
File path: 
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -285,14 +286,12 @@ private boolean 
areSomeRegionReplicasColocated(BalancerClusterState c) {
     return false;
   }
 
-  private String getBalanceReason(double total, double sumMultiplier) {
+  private String getBalanceReason(double total) {
     if (total <= 0) {
-      return "(cost1*multiplier1)+(cost2*multiplier2)+...+(costn*multipliern) 
= " + total + " <= 0";
-    } else if (sumMultiplier <= 0) {
-      return "sumMultiplier = " + sumMultiplier + " <= 0";
+      return "(weighted sum of imbalance = " + total + " <= 0";
     } else if ((total / sumMultiplier) < minCostNeedBalance) {
-      return 
"[(cost1*multiplier1)+(cost2*multiplier2)+...+(costn*multipliern)]/sumMultiplier
 = " +
-        (total / sumMultiplier) + " <= minCostNeedBalance(" + 
minCostNeedBalance + ")";
+      return "(weighted average imbalance = " +
+        (total / sumMultiplier) + " < threshold (" + minCostNeedBalance + ")";

Review comment:
       If it is 0, the cost function is excluded at constructor.




-- 
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.

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


Reply via email to