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