You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ri...@apache.org on 2022/08/19 20:59:38 UTC
[ozone] branch master updated: HDDS-7108. Include supported EC data-parity combinations in error message (#3665)
This is an automated email from the ASF dual-hosted git repository.
ritesh 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 e9689764d3 HDDS-7108. Include supported EC data-parity combinations in error message (#3665)
e9689764d3 is described below
commit e9689764d3d739da46ae8cbd8e5ff55594ce469c
Author: DaveTeng0 <10...@users.noreply.github.com>
AuthorDate: Fri Aug 19 13:59:33 2022 -0700
HDDS-7108. Include supported EC data-parity combinations in error message (#3665)
---
.../org/apache/hadoop/hdds/client/ReplicationConfigValidator.java | 8 +++++---
.../apache/hadoop/hdds/client/TestReplicationConfigValidator.java | 6 ++++--
2 files changed, 9 insertions(+), 5 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 7090c76563..36d95251ed 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
@@ -61,9 +61,11 @@ public class ReplicationConfigValidator {
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");
}
}
return replicationConfig;
diff --git a/hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/client/TestReplicationConfigValidator.java b/hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/client/TestReplicationConfigValidator.java
index bbdc78c94a..acf657b4ba 100644
--- a/hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/client/TestReplicationConfigValidator.java
+++ b/hadoop-hdds/common/src/test/java/org/apache/hadoop/hdds/client/TestReplicationConfigValidator.java
@@ -51,8 +51,10 @@ public class TestReplicationConfigValidator {
try {
validator.validate(new ECReplicationConfig(invalidEcConfig1));
} catch (IllegalArgumentException ex) {
- GenericTestUtils.assertExceptionContains("Invalid replication " +
- "config for type EC and replication xor-6-4-{CHUNK_SIZE}", ex);
+ GenericTestUtils.assertExceptionContains(
+ "Invalid data-parity replication " +
+ "config for type EC and replication xor-6-4-{CHUNK_SIZE}. " +
+ "Supported data-parity are 3-2,6-3,10-4", ex);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org