fmorg-git commented on code in PR #12222:
URL: https://github.com/apache/ozone/pull/12222#discussion_r4777796715
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3InitiateMultipartUploadRequest.java:
##########
@@ -271,6 +275,33 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, Execut
return omClientResponse;
}
+ /**
+ * Sets in the response when the multipart upload becomes eligible for abort
under the bucket lifecycle
+ * configuration, for the S3 x-amz-abort-date and x-amz-abort-rule-id
headers, if a rule applies to it.
+ * A failed lookup only leaves it out.
+ */
+ protected void addLifecycleAbortInfo(MultipartInfoInitiateResponse.Builder
response,
+ OMMetadataManager omMetadataManager, String volumeName, String
bucketName, String keyName, OmKeyInfo omKeyInfo) {
+ try {
+ OmLifecycleConfiguration lifecycleConfiguration =
omMetadataManager.getLifecycleConfigurationTable()
Review Comment:
this method appears to have some overlap with
`KeyManagerImpl.getLifecycleAbortInfo` - is set possible to put the overlap in
a shared utility method in a class like `OMMultipartUploadUtils` and have both
`S3InitiateMultipartUploadRequest` and `KeyManagerImpl` call the shared utility
method?
--
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]