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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/PlacementPolicy.java:
##########
@@ -60,9 +62,23 @@ List<DatanodeDetails> chooseDatanodes(List<DatanodeDetails> 
usedNodes,
    * Given a list of datanode and the number of replicas required, return
    * a PlacementPolicyStatus object indicating if the container meets the
    * placement policy - ie is it on the correct number of racks, etc.
-   * @param dns List of datanodes holding a replica of the container
+   * @param dns List of replica holding a replica of the container
    * @param replicas The expected number of replicas
    */
   ContainerPlacementStatus validateContainerPlacement(
-      List<DatanodeDetails> dns, int replicas);
+          List<DatanodeDetails> dns, int replicas);
+  Map<Replica, Integer> replicasToCopy(Set<Replica> replicas,
+                                       int expectedCountPerUniqueReplica,
+                                       int expectedUniqueGroups);
+
+  Set<Replica> replicasToRemove(Set<Replica> replicas,
+                                int expectedCountPerUniqueReplica,
+                                int expectedUniqueGroups);
+
+
+  /** Gets the group of from the datanode based on the placement.
+   * @param dn
+   * @return PlacementGroup
+   */
+  PlacementGroup getPlacementGroup(DatanodeDetails dn);

Review Comment:
   I'm not sure if placementGroup needs to be exposed outside of the internals. 
Are we going to need it anywhere else?



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