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/06/08 06:17:19 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3491: HDDS-6827. Need proper error message when "RATIS" replication-type is passed with EC codec

adoroszlai commented on code in PR #3491:
URL: https://github.com/apache/ozone/pull/3491#discussion_r891954311


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfig.java:
##########
@@ -182,7 +182,12 @@ static ReplicationConfig parseWithoutFallback(ReplicationType type,
       try {
         factor = ReplicationFactor.valueOf(Integer.parseInt(replication));
       } catch (NumberFormatException ex) {
-        factor = ReplicationFactor.valueOf(replication);
+        try {
+          factor = ReplicationFactor.valueOf(replication);
+        } catch (IllegalArgumentException e) {
+          throw new IllegalArgumentException(replication +
+              " is not supported for RATIS replication type", e);

Review Comment:
   `type` could be `STAND_ALONE`, too.
   
   ```suggestion
                 " is not supported for " + type + " replication type", e);
   ```



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