siddhantsangwan commented on code in PR #7134:
URL: https://github.com/apache/ozone/pull/7134#discussion_r1741671736


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerTask.java:
##########
@@ -341,6 +341,16 @@ public List<ContainerBalancerTaskIterationStatusInfo> 
getCurrentIterationsStatis
         .max()
         .orElse(0);
 
+    // the balancing thread could go to sleep without having initialized 
findTargetStrategy, so we check for null here
+    Map<DatanodeDetails, Long> sizeEnteringNodes = Collections.emptyMap();
+    if (findTargetStrategy != null) {
+      sizeEnteringNodes = findTargetStrategy.getSizeEnteringNodes();
+    }
+    Map<DatanodeDetails, Long> sizeLeavingNodes = Collections.emptyMap();

Review Comment:
   Sure - we can come back to this after we've resolved your first review 
comment above.



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