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/09/14 15:16:37 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #3744: HDDS-7206. Change the placement policy interface to allow existing nodes to be specified for Rack Scatter Policy.

sodonnel commented on code in PR #3744:
URL: https://github.com/apache/ozone/pull/3744#discussion_r970958615


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/SCMCommonPlacementPolicy.java:
##########
@@ -146,8 +159,14 @@ object of DatanodeDetails(with Topology Information) while trying to get the
   random node from NetworkTopology should fix this. Check HDDS-7015
  */
     return chooseDatanodesInternal(
+            Objects.isNull(usedNodes) ? Collections.emptyList()

Review Comment:
   Might be a good idea to move the logic for handling the empty collection and mapping it into a private method, as I think its duplicate here for used and excluded nodes?



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