siddhantsangwan commented on a change in pull request #2578:
URL: https://github.com/apache/ozone/pull/2578#discussion_r718451563
##########
File path:
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java
##########
@@ -348,17 +361,24 @@ private boolean initializeIteration() {
}
private IterationResult doIteration() {
+ // note that potential and selected targets are updated in the following
+ // loop
List<DatanodeDetails> potentialTargets = getPotentialTargets();
Set<DatanodeDetails> selectedTargets =
new HashSet<>(potentialTargets.size());
moveSelectionToFutureMap = new HashMap<>(unBalancedNodes.size());
// match each overUtilized node with a target
for (DatanodeUsageInfo datanodeUsageInfo : overUtilizedNodes) {
+ if (!balancerRunning || Thread.currentThread().isInterrupted()) {
Review comment:
Yes, I think checking only `balancerRunning` is enough. I'll change this.
--
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]