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/06/24 08:07:08 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #3415: HBASE-25739 TableSkewCostFunction need to use aggregated deviation

Apache9 commented on a change in pull request #3415:
URL: https://github.com/apache/hbase/pull/3415#discussion_r657718761



##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/CostFunction.java
##########
@@ -89,13 +89,14 @@ protected void regionMoved(int region, int oldServer, int newServer) {
    * @return The scaled value.
    */
   protected static double scale(double min, double max, double value) {
-    if (max <= min || value <= min) {
+    if (max <= min || value <= min
+      || Math.abs(max - min) <= 0.01 || Math.abs(value - min) <= 0.01) {

Review comment:
       Is 0.01 a suitable threshold? At least make a constant maybe called `DELTA`?

##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -125,7 +125,7 @@
   private int stepsPerRegion = 800;
   private long maxRunningTime = 30 * 1000 * 1; // 30 seconds.
   private int numRegionLoadsToRemember = 15;
-  private float minCostNeedBalance = 0.05f;
+  private float minCostNeedBalance = 0.025f;

Review comment:
       Is this change related?

##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BalancerClusterState.java
##########
@@ -290,7 +294,9 @@ public String getRack(ServerName server) {
     }
 
     numTables = tables.size();
+    LOG.info("number of tables = {}", numTables);

Review comment:
       Is info the suitable level here? Or debug?




-- 
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:
users@infra.apache.org