Skip to content

Comments

HDDS-6889. EC: put key command with EC replication can use ReplicationConfig validator#3565

Merged
umamaheswararao merged 4 commits intoapache:masterfrom
swamirishi:HDDS-6889
Jul 13, 2022
Merged

HDDS-6889. EC: put key command with EC replication can use ReplicationConfig validator#3565
umamaheswararao merged 4 commits intoapache:masterfrom
swamirishi:HDDS-6889

Conversation

@swamirishi
Copy link
Contributor

@swamirishi swamirishi commented Jun 28, 2022

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

@swamirishi swamirishi changed the title HDDS-6889: EC: put key command with EC replication can use Replicatio… HDDS-6889: EC: put key command with EC replication can use ReplicationConfig validator Jun 28, 2022
@swamirishi swamirishi changed the title HDDS-6889: EC: put key command with EC replication can use ReplicationConfig validator HDDS-6889. EC: put key command with EC replication can use ReplicationConfig validator Jun 28, 2022
Copy link
Contributor

@umamaheswararao umamaheswararao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the unnecessary empty line

String volumeName = UUID.randomUUID().toString();
String bucketName = UUID.randomUUID().toString();

String value = "dummy";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need string here?

}

@ParameterizedTest
@ValueSource(strings = {"rs-3-3-1024k", "xor-3-5-2048k"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should pass valid values also? probably we can pass Pairs indicating valid config or not. Based valid flag, you can assert differently.

@adoroszlai adoroszlai added the EC label Jul 1, 2022
Copy link
Contributor

@umamaheswararao umamaheswararao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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<>()));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: remove below unnecessary empty lines?

Copy link
Contributor

@umamaheswararao umamaheswararao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending CI.

@umamaheswararao umamaheswararao merged commit 27745b5 into apache:master Jul 13, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants