siddhantsangwan commented on code in PR #7134:
URL: https://github.com/apache/ozone/pull/7134#discussion_r1741665691
##########
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) {
Review Comment:
Not sure what you mean here. Are you suggesting initialising
`findTargetStrategy` in the constructor of `ContainerBalancerTask` (like
`findSourceStrategy`)? That should work as well.
--
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]