rakeshadr commented on code in PR #11626:
URL: https://github.com/apache/ozone/pull/11626#discussion_r4452377281
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java:
##########
@@ -134,6 +134,9 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
repConfig, new ExcludeList(), requestedSize,
keyArgs.getSortDatanodes(), userInfo, ozoneManager,
storagePolicy, getAllowFallbackStoragePolicy(bucketInfo));
+ // TODO: stamp the policy only if STORAGE_POLICY_SUPPORT is finalized (see
Review Comment:
For the ToDos, please create follow-up jira ticket and tag here as a
reminder.
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/request/s3/multipart/TestS3InitiateMultipartUploadRequestWithFSO.java:
##########
@@ -166,6 +166,15 @@ private long verifyDirectoriesInDB(List<String> dirs,
final long volumeId,
return parentID;
}
+ /** A top-level key is a child of the bucket, so the bucket is its parent. */
+ @Override
+ protected String getMultipartOpenKey(String volumeName, String bucketName,
Review Comment:
Can you add one special test scenario: "bucket policy changed between
initiate and part write"
Initiate with no explicit policy (inherits WARM bucket), change bucket to
between initiate and part write COLD, write a part - blocks should still land
on WARM.
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3InitiateMultipartUploadRequest.java:
##########
@@ -98,8 +100,21 @@ public OMRequest preExecute(OzoneManager ozoneManager)
throws IOException {
generateRequiredEncryptionInfo(keyArgs, newKeyArgs, ozoneManager);
- KeyArgs resolvedArgs = resolveBucketAndCheckKeyAcls(newKeyArgs.build(),
- ozoneManager, ACLType.CREATE);
+ final KeyArgs.Builder resolvedArgsBuilder =
resolveBucketAndCheckKeyAcls(newKeyArgs.build(),
+ ozoneManager, ACLType.CREATE).toBuilder();
+
+ // Stamp the policy only once finalized: an OM without storage policy
support ignores the field, so stamping it
+ // earlier would make old and new OMs apply this request differently.
Clearing also drops a client-sent value.
+ if
(ozoneManager.getVersionManager().isAllowed(OMLayoutFeature.STORAGE_POLICY_SUPPORT))
{
Review Comment:
S3 Gateway ObjectEndpoint doesn't pass storage policy to
initiateMultipartUpload. I'm okay to create a separate sub-task and implement
it.
`x-amz-storage-class:`
--
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]