sodonnel commented on a change in pull request #2990:
URL: https://github.com/apache/ozone/pull/2990#discussion_r791747724
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/shell/TestOzoneShellHA.java
##########
@@ -910,6 +912,28 @@ public void testCreateBucketWithECReplicationConfig()
throws Exception {
}
}
+ @Test
+ public void testPutKeyOnBucketWithECReplicationConfig() throws Exception {
+ final String volumeName = "volume1000";
Review comment:
The pattern in this test class is already established, but I generally
prefer we use randomly generated volume, bucket and keynames where the
mini-cluster is shared across multiple tests. No need to change this test for
this PR, as all the existing tests have hard coded bucket / volume / key names,
but just keep it in mind for the future.
##########
File path:
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/OzoneClientUtils.java
##########
@@ -64,4 +69,38 @@ public static BucketLayout
resolveLinkBucketLayout(OzoneBucket bucket,
}
return bucket.getBucketLayout();
}
+
+ public static ReplicationConfig validateAndGetClientReplicationConfig(
Review comment:
Should we have a unit test for the logic in this method, as there are
quite a few IF statements etc.
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneConfigUtil.java
##########
@@ -44,12 +44,18 @@ public static ReplicationConfig
resolveReplicationConfigPreference(
} else {
// type is NONE, so, let's look for the bucket defaults.
if (bucketDefaultReplicationConfig != null) {
+ boolean hasECReplicationConfig = bucketDefaultReplicationConfig
Review comment:
Should we have a test for this static method to validate the logic
within it?
--
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]