sodonnel commented on a change in pull request #2880:
URL: https://github.com/apache/ozone/pull/2880#discussion_r761797213
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestOzoneRpcClientAbstract.java
##########
@@ -3753,4 +3757,65 @@ public void testOverWriteKeyWithAndWithOutVersioning()
throws Exception {
createRequiredForVersioningTest(volumeName, bucketName, keyName, true);
checkExceptedResultForVersioningTest(volumeName, bucketName, keyName, 2);
}
+
+ @Test
+ public void testSetECReplicationConfigOnBucket()
+ throws IOException {
+ String volumeName = UUID.randomUUID().toString();
+ store.createVolume(volumeName);
+ OzoneVolume volume = store.getVolume(volumeName);
+ OzoneBucket bucket = getBucket(volume);
+ Assert.assertEquals(bucket.getName(), bucket.getName());
+ ReplicationConfig currentReplicationConfig = bucket.getReplicationConfig();
+ Assert.assertEquals(
+ new StandaloneReplicationConfig(HddsProtos.ReplicationFactor.ONE),
+ currentReplicationConfig);
+ bucket.setReplicationConfig(
+ new ECReplicationConfig(3, 2, ECReplicationConfig.EcCodec.RS, 1024));
+
+ // Get the bucket and check the updated config.
+ bucket = volume.getBucket(bucket.getName());
+
+ Assert.assertEquals(
+ new ECReplicationConfig(3, 2, ECReplicationConfig.EcCodec.RS, 1024),
+ bucket.getReplicationConfig());
+
+ //Reset replication config back.
+ bucket.setReplicationConfig(currentReplicationConfig);
+ }
+
+ @Test
+ public void testSetRatisReplicationConfigOnBucket()
+ throws IOException {
+ String volumeName = UUID.randomUUID().toString();
+ store.createVolume(volumeName);
+ OzoneVolume volume = store.getVolume(volumeName);
+ OzoneBucket bucket = getBucket(volume);
+ Assert.assertEquals(bucket.getName(), bucket.getName());
Review comment:
Same comment as above, I don't think this assert for `bucket.getName(),
bucket.getName()` is needed.
--
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]