You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/07/18 09:05:27 UTC

[GitHub] [ozone] lokeshj1703 commented on a diff in pull request #3485: HDDS-6243. sourceToTargetMap in ContainerBalancer doesn't support multiple entries with same source.

lokeshj1703 commented on code in PR #3485:
URL: https://github.com/apache/ozone/pull/3485#discussion_r923119454


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancer.java:
##########
@@ -815,10 +822,12 @@ private void resetState() {
     this.clusterCapacity = 0L;
     this.clusterUsed = 0L;
     this.clusterRemaining = 0L;
-    this.selectedContainers.clear();
     this.overUtilizedNodes.clear();
     this.underUtilizedNodes.clear();
     this.unBalancedNodes.clear();
+    this.containerFromSourceMap.clear();
+    this.containerToTargetMap.clear();
+    this.selectedContainersList.clear();

Review Comment:
   Yes, I think it would be better to reset the state in a common function.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org