HDDS-6889. EC: put key command with EC replication can use ReplicationConfig validator#3565
Merged
umamaheswararao merged 4 commits intoapache:masterfrom Jul 13, 2022
Merged
Conversation
…nConfig validator
Contributor
umamaheswararao
left a comment
There was a problem hiding this comment.
Thanks @swamirishi for working on this patch. I have few comments, please check. Thanks
| String bucketName = UUID.randomUUID().toString(); | ||
| Instant testStartTime = Instant.now(); | ||
|
|
||
| String value = "sample value"; |
Contributor
There was a problem hiding this comment.
Removed the unnecessary empty line
| String volumeName = UUID.randomUUID().toString(); | ||
| String bucketName = UUID.randomUUID().toString(); | ||
|
|
||
| String value = "dummy"; |
Contributor
There was a problem hiding this comment.
Why do you need string here?
| } | ||
|
|
||
| @ParameterizedTest | ||
| @ValueSource(strings = {"rs-3-3-1024k", "xor-3-5-2048k"}) |
Contributor
There was a problem hiding this comment.
You should pass valid values also? probably we can pass Pairs indicating valid config or not. Based valid flag, you can assert differently.
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationConfigValidator.java
Show resolved
Hide resolved
Contributor
umamaheswararao
left a comment
There was a problem hiding this comment.
Patch is almost good. please fix small non code issues.
| Assertions.assertThrows(IllegalArgumentException.class, | ||
| () -> bucket.createKey(keyName, "dummy".getBytes(UTF_8).length, | ||
| replicationConfig, new HashMap<>())); | ||
| } |
Contributor
There was a problem hiding this comment.
Nit: remove below unnecessary empty lines?
umamaheswararao
approved these changes
Jul 12, 2022
Contributor
umamaheswararao
left a comment
There was a problem hiding this comment.
LGTM, pending CI.
duongkame
pushed a commit
to duongkame/ozone
that referenced
this pull request
Aug 16, 2022
HDDS-6889. EC: put key command with EC replication can use ReplicationConfig validator (apache#3565) (cherry picked from commit 27745b5) Change-Id: I0a0f0b7ef880e5d02bcb6f3aa6c9a95a6a18c5b1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Validate keys while putting a key
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6889
How was this patch tested?
Unit test, Integration Test