juncevich commented on code in PR #7134:
URL: https://github.com/apache/ozone/pull/7134#discussion_r1736285359
##########
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:
There is non-obvious, that findTarget(Source)Strategy can be null. Maybe it
will be better to use some default realisation with empty map, if
org.apache.hadoop.hdds.scm.container.balancer.ContainerBalancerTask#initializeIteration
was not executed?
--
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]