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 2020/09/11 06:00:33 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #2376: HBASE-25006 Make the cost functions optional for StochastoicBalancer

virajjasani commented on a change in pull request #2376:
URL: https://github.com/apache/hbase/pull/2376#discussion_r486791208



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -596,6 +596,14 @@ protected void updateCostsWithAction(Cluster cluster, Action action) {
     }
   }
 
+  private void addCostFunction(CostFunction costFunction) {
+    if (costFunction.getMultiplier() <= 0) {
+      LOG.info("exclude cost function {}", costFunction.getClass().getSimpleName());

Review comment:
       I believe it's better to have this logic:
   ```
       if (costFunction.getMultiplier() > 0) {
         LOG.debug("Including cost function {}", costFunction.getClass().getSimpleName());
         costFunctions.add(costFunction);
       }
   ```




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