desaikomal commented on code in PR #2470:
URL: https://github.com/apache/helix/pull/2470#discussion_r1186220302


##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/AutoRebalancer.java:
##########
@@ -129,14 +129,12 @@ public IdealState computeNewIdealState(String 
resourceName,
     ZNRecord newMapping = _rebalanceStrategy
         .computePartitionAssignment(allNodes, liveNodes, currentMapping, 
clusterData);
 
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("currentMapping: " + currentMapping);
-      LOG.debug("stateCountMap: " + stateCountMap);
-      LOG.debug("liveNodes: " + liveNodes);
-      LOG.debug("allNodes: " + allNodes);
-      LOG.debug("maxPartition: " + maxPartition);
-      LOG.debug("newMapping: " + newMapping);
-    }
+      LOG.debug("currentMapping: {}", currentMapping);

Review Comment:
   nit: alignment may be off. please fix it if possible.



##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/DelayedAutoRebalancer.java:
##########
@@ -60,9 +60,7 @@ public IdealState computeNewIdealState(String resourceName,
 
     IdealState cachedIdealState = getCachedIdealState(resourceName, 
clusterData);
     if (cachedIdealState != null) {
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("Use cached IdealState for " + resourceName);
-      }
+        LOG.debug("Use cached IdealState for {}", resourceName);

Review Comment:
   nit: alignment.



##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZkCacheEventThread.java:
##########
@@ -74,11 +72,9 @@ public void run() {
         } catch (ThreadDeath death) {
           throw death;
         } catch (Throwable e) {
-          LOG.error("Error handling event " + zkEvent, e);
-        }
-        if (LOG.isDebugEnabled()) {
-          LOG.debug("Delivering event #" + eventId + " done");
+          LOG.error("Error handling event {} ", zkEvent, e);
         }
+          LOG.debug("Delivering event # {} done", eventId);

Review Comment:
   nit: alignment



##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/DelayedAutoRebalancer.java:
##########
@@ -181,16 +179,14 @@ public IdealState computeNewIdealState(String 
resourceName,
 
     finalMapping.getListFields().putAll(userDefinedPreferenceList);
 
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("currentMapping: " + currentMapping);
-      LOG.debug("stateCountMap: " + stateCountMap);
-      LOG.debug("liveEnabledNodes: " + liveEnabledNodes);
-      LOG.debug("activeNodes: " + activeNodes);
-      LOG.debug("allNodes: " + allNodes);
-      LOG.debug("maxPartition: " + maxPartition);
-      LOG.debug("newIdealMapping: " + newIdealMapping);
-      LOG.debug("finalMapping: " + finalMapping);
-    }
+      LOG.debug("currentMapping: {}", currentMapping);

Review Comment:
   nit: alignment



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to