chungen0126 commented on code in PR #11479:
URL: https://github.com/apache/ozone/pull/11479#discussion_r4312768390


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3RequestContext.java:
##########
@@ -59,13 +59,20 @@ OzoneVolume getVolume() throws IOException {
 
   OzoneBucket getBucket(String name) throws IOException {
     if (bucket == null) {
-      bucket = getVolume().getBucket(name);
+      bucket = endpoint.getClientProtocol().getS3BucketDetails(name);
     } else {
       Preconditions.assertEquals(bucket.getName(), name, "Multiple buckets in 
one request are not supported");
     }
     return bucket;
   }
 
+  /**
+   * Returns the S3 volume name, reusing the bucket already looked up in this 
request to avoid another call.
+   */
+  String getVolumeName() throws IOException {

Review Comment:
   Add tests.



-- 
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]

Reply via email to