virajjasani commented on a change in pull request #687: HBASE-23116: Fix a 
couple of load balancer logging nits.
URL: https://github.com/apache/hbase/pull/687#discussion_r331357338
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
 ##########
 @@ -348,9 +348,10 @@ protected boolean needsBalance(Cluster cluster) {
     if (total <= 0 || sumMultiplier <= 0
         || (sumMultiplier > 0 && (total / sumMultiplier) < 
minCostNeedBalance)) {
       if (LOG.isTraceEnabled()) {
-        LOG.trace("Skipping load balancing because balanced cluster; " + 
"total cost is " + total
-          + ", sum multiplier is " + sumMultiplier + " min cost which need 
balance is "
-          + minCostNeedBalance);
+        final String loadBalanceTarget = isByTable ? String.format("table 
(%s)", tableName) : "cluster";
 
 Review comment:
   nit: although loadBalanceTarget is used just for logging, it is better to 
keep only log.trace() within LOG.isTraceEnabled()

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to