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


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ECUnderReplicationHandler.java:
##########
@@ -63,16 +64,24 @@ public class ECUnderReplicationHandler implements 
UnhealthyReplicationHandler {
   private final PlacementPolicy containerPlacement;
   private final long currentContainerSize;
   private final NodeManager nodeManager;
+  private final ReplicationManager replicationManager;
+
+  private static class CannotFindTargetsException extends IOException {

Review Comment:
   I added this new exception for two reasons:
   
   1. SCMException can be thrown in many places, and if we get it thrown, we 
cannot be sure if it was due to Not_Enough_Nodes.
   2. One of the placement policies I checked, never set a code 
(Not_Enough_Nodes etc) when it threw the exception.
   
   So I wrapped the call to the PlacementPolicy and catch SCMException and then 
explicitly throw this new private one. 
   
   We probably should have another Jira to clean up the placement policies and 
ensure we set the SCM_Exception code corretly - if we know the policies always 
throw SCM_Exception with a Not_Enough_Nodes code, then we can check for that 
without this extra exception type.



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