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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/algorithms/SCMContainerPlacementCapacity.java:
##########
@@ -98,7 +98,7 @@ public SCMContainerPlacementCapacity(final NodeManager 
nodeManager,
    * @throws SCMException  SCMException
    */
   @Override
-  public List<DatanodeDetails> chooseDatanodes(
+  protected List<DatanodeDetails> chooseDatanodesInternal(

Review Comment:
   At line 105, I think you need to change `super.chooseDatanodes` to 
`super.chooseDatanodesInternal()`.
   
   Also to get the test to pass, I needed to add this to 
TestSCMContainerPlacementCapacity:
   
   ```
       when(mockNodeManager.getNodeByUuid(anyString())).thenAnswer(
           invocation -> {
             String uuid = invocation.getArgument(0);
             return datanodes.stream().filter(
                 datanode -> 
datanode.getUuid().toString().equals(uuid)).findFirst()
                     .orElse(null);
           });
   ```
   
   I suspect the other test classes for the other policies need something 
similar.



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