smengcl commented on code in PR #11973:
URL: https://github.com/apache/ozone/pull/11973#discussion_r4509149641
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocol/OzoneManagerProtocol.java:
##########
@@ -674,7 +674,7 @@ OmMultipartUploadListParts listParts(String volumeName,
String bucketName,
int maxParts) throws IOException;
/**
- * List in-flight uploads.
+ * List in-flight uploads. A null volume name resolves the S3 volume context.
Review Comment:
This contract only holds for `OzoneManagerProtocolClientSideTranslatorPB`.
`OzoneManager` also implements this interface, and
`OzoneManager.listMultipartUploads(null, ...)` would go straight to
`resolveBucketLink(Pair.of(null, bucket))` without any S3 volume lookup. Same
for the `listParts` javadoc above.
Maybe use an explicit `assumeS3Context` parameter like `getBucketInfo` and
`abortMultipartUpload(OmKeyArgs, boolean)` do here, or limit the null wording
to the client side?
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -4420,7 +4420,7 @@ public S3VolumeContext getS3VolumeContext() throws
IOException {
return getS3VolumeContext(false);
}
- S3VolumeContext getS3VolumeContext(boolean skipChecks) throws IOException {
+ public S3VolumeContext getS3VolumeContext(boolean skipChecks) throws
IOException {
Review Comment:
Could we keep this package-private?
The other ops that use `assumeS3Context` (`getBucketInfo(volume, bucket,
assumeS3Context)` and `getObjectTagging` with `args.isAssumeS3Context()`)
resolve the S3 volume inside `OzoneManager` itself.
If `listParts` / `listMultipartUploads` did the same (e.g. an overload
taking `assumeS3Context`, called from `OzoneManagerRequestHandler`), this
method would not need to become public and the resolution logic would stay in
one place.
--
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]