wchevreuil 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_r331446066
##########
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:
@virajjasani better to keep like this, as we don't need the extra execution
in case TRACE isn't on, and keeping it as a separate variable gives better
readability.
----------------------------------------------------------------
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