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/08/20 09:35:29 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3665: HDDS-7108. Include supported EC data-parity combinations in error message

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


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfigValidator.java:
##########
@@ -61,9 +61,11 @@ public ReplicationConfig validate(ReplicationConfig replicationConfig) {
           replication =  ecConfig.getCodec() + "-" + ecConfig.getData() +
               "-" + ecConfig.getParity() + "-{CHUNK_SIZE}";
         }
-        throw new IllegalArgumentException("Invalid replication config " +
-            "for type " + replicationConfig.getReplicationType() +
-            " and replication " + replication);
+        throw new IllegalArgumentException(
+                "Invalid data-parity replication config " +
+                        "for type " + replicationConfig.getReplicationType() +
+                        " and replication " + replication + "." +
+                        " Supported data-parity are 3-2,6-3,10-4");

Review Comment:
   Sorry for the late review.
   
   This exception may be thrown for non-EC replication config, too, in which case `data-parity` is not applicable.  The message should be different based on replication type.
   
   CLI commands validate RATIS replication factor before reaching this check, but Java code using `RpcClient#createKey` directly could encounter this problem.



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