You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/10/26 17:36:29 UTC

[GitHub] [hbase] huaxiangsun commented on a change in pull request #3724: HBASE-26311 Balancer gets stuck in cohosted replica distribution

huaxiangsun commented on a change in pull request #3724:
URL: https://github.com/apache/hbase/pull/3724#discussion_r736774777



##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/DoubleArrayCost.java
##########
@@ -74,7 +74,7 @@ private static double computeCost(double[] stats) {
 
     for (int i = 0; i < stats.length; i++) {
       double n = stats[i];
-      double diff = Math.abs(mean - n);
+      double diff = (mean - n) * (mean - n);

Review comment:
       Can it be changed to Math.pow(mean -n, 2)?




-- 
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-unsubscribe@hbase.apache.org

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