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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/SCMCommonPlacementPolicy.java:
##########
@@ -426,4 +434,41 @@ public boolean isValidNode(DatanodeDetails datanodeDetails,
     }
     return false;
   }
+
+  @Override
+  public Set<ContainerReplica> replicasToCopy(
+         Set<ContainerReplica> replicas, int expectedCountPerUniqueReplicas,
+         int expectedUniqueGroups) {
+    Map<Node, Set<ContainerReplica>> placementGroupReplicaIdMap

Review Comment:
   I think it would make the for loop below easier if we transformed this into 
a `Map<Node, List<ContainerReplica>>`. It would probably be slightly faster 
too, as forming a set is more expensive that a list.
   
   As we are passed a Set of ContainerReplica, we already know there are no 
duplicates, so its safe enough to transform to the 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: [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