swamirishi commented on code in PR #3606:
URL: https://github.com/apache/ozone/pull/3606#discussion_r924832321
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementRackScatter.java:
##########
@@ -107,8 +107,12 @@ public List<DatanodeDetails> chooseDatanodes(
int excludedNodesCount = excludedNodes == null ? 0 : excludedNodes.size();
List<Node> availableNodes = networkTopology.getNodes(
networkTopology.getMaxLevel());
+ List<Node> unavailableNodes = new ArrayList<>();
int totalNodesCount = availableNodes.size();
if (excludedNodes != null) {
+ unavailableNodes.addAll(
+ availableNodes.stream().filter(excludedNodes::contains)
Review Comment:
The excludeList is passed through ExcludeListProto which basically has an
array of strings in protobuf message. This is particularly being changed only
on allocate block flow. Changing the message could make it not compatible with
older clients which would be an issue.
--
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]