sodonnel commented on a change in pull request #2401:
URL: https://github.com/apache/ozone/pull/2401#discussion_r669515963
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java
##########
@@ -650,12 +650,22 @@ protected OmKeyInfo createFileInfo(@Nonnull KeyArgs
keyArgs,
.setCreationTime(keyArgs.getModificationTime())
.setModificationTime(keyArgs.getModificationTime())
.setDataSize(size)
- .setReplicationConfig(replicationConfig)
.setFileEncryptionInfo(encInfo)
.setAcls(getAclsForKey(keyArgs, omBucketInfo, prefixManager))
.addAllMetadata(KeyValueUtil.getFromProtobuf(
keyArgs.getMetadataList()))
.setUpdateID(transactionLogIndex);
+ ECReplicationConfig ecReplicationConfig =
+ omBucketInfo.getEcReplicationConfig();
+ if (ecReplicationConfig != null) {
+ // if bucket has the ec replication config, then we will inherit it from
+ // bucket.
+ builder.setReplicationConfig(ecReplicationConfig);
+ } else {
+ // Otherwise use the client passed replication config.
+ builder.setReplicationConfig(replicationConfig);
Review comment:
I cannot remember what we decided on this.
If I bucket is set to be EC, is it impossible to create any RATIS THREE or
ONE keys in it?
Similar if a bucket is set to RATIS, is it impossible to create any EC keys
in it?
How do things currently work with RATIS - is it possible to have REPL=3 and
REPL=1 keys in the same bucket?
If feels like if REPL 3 and 1 are allowed in the same bucket, then perhaps
EC should be allowed too for consistency.
Then we should have a bucket level policy that can be overridden by the
client passed setting.
--
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]