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