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/19 07:19:28 UTC

[GitHub] [ozone] swamirishi commented on a diff in pull request #3606: HDDS-7015. Failures while choosing nodes for creating container

swamirishi commented on code in PR #3606:
URL: https://github.com/apache/ozone/pull/3606#discussion_r924145356


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackScatter.java:
##########
@@ -143,10 +147,12 @@ public List<DatanodeDetails> chooseDatanodes(
 
     List<Node> toChooseRacks = new LinkedList<>();
     Set<DatanodeDetails> chosenNodes = new LinkedHashSet<>();
-    List<Node> unavailableNodes = new ArrayList<>();
     Set<Node> skippedRacks = new HashSet<>();
     if (excludedNodes != null) {
-      unavailableNodes.addAll(excludedNodes);
+      unavailableNodes.addAll(
+              excludedNodes.stream()
+                      .filter(node->!unavailableNodes.contains(node))
+                      .collect(Collectors.toList()));
     }

Review Comment:
   I am just adding the nodes which might not have come as part of the available nodes list.



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