This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new a1ba9eaa55 HDDS-7108. Make ReplicationConfig validation error message
type-specific (#3702)
a1ba9eaa55 is described below
commit a1ba9eaa55bb795e165f3082da7d99d953c5688f
Author: DaveTeng0 <[email protected]>
AuthorDate: Sun Aug 21 12:51:48 2022 -0700
HDDS-7108. Make ReplicationConfig validation error message type-specific
(#3702)
---
.../apache/hadoop/hdds/client/ReplicationConfigValidator.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfigValidator.java
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfigValidator.java
index 93f83d167f..e690663912 100644
---
a/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfigValidator.java
+++
b/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfigValidator.java
@@ -62,12 +62,17 @@ public class ReplicationConfigValidator {
(ECReplicationConfig) replicationConfig;
replication = ecConfig.getCodec() + "-" + ecConfig.getData() +
"-" + ecConfig.getParity() + "-{CHUNK_SIZE}";
- }
- throw new IllegalArgumentException(
+ //EC type checks data-parity
+ 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");
+ }
+ //Non-EC type
+ throw new IllegalArgumentException("Invalid replication config " +
+ "for type " + replicationConfig.getReplicationType() +
+ " and replication " + replication);
}
return replicationConfig;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]