ashishkumar50 commented on code in PR #10892:
URL: https://github.com/apache/ozone/pull/10892#discussion_r3718208997


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerSelectionCriteria.java:
##########
@@ -55,7 +55,8 @@ public class ContainerBalancerSelectionCriteria {
   private Map<ContainerID, DatanodeDetails> containerToSourceMap;
   private Set<ContainerID> excludeContainers;
   private Set<ContainerID> includeContainers;
-  private Set<ContainerID> excludeContainersDueToFailure;
+  private final Set<ContainerID> excludeContainersDueToFailure;
+  private final Set<ContainerID> excludeContainersNotFound;

Review Comment:
   Add a comment to describe above two fields. One is for the iteration and 
other across iteration persisted.



##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerSelectionCriteria.java:
##########
@@ -383,6 +408,9 @@ private NavigableSet<ContainerID> 
getCandidateContainers(DatanodeDetails node) {
       if (excludeContainersDueToFailure != null) {
         idSet.removeAll(excludeContainersDueToFailure);
       }
+      if (excludeContainersNotFound != null) {

Review Comment:
   Since these are final, it cannot be null. Remove this null check and even 
remove null check for `excludeContainersDueToFailure`.



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