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


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/protocol/ClientProtocol.java:
##########
@@ -342,6 +342,15 @@ void checkBucketAccess(String volumeName, String 
bucketName)
   OzoneBucket getBucketDetails(String volumeName, String bucketName)
       throws IOException;
 
+  /**
+   * Returns Bucket Information.

Review Comment:
   nit: Could the Javadoc clarify that this resolves the S3 volume from the 
current S3 context?



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -3288,19 +3289,33 @@ private OmBucketInfo getResolvedSourceBucket(
   @Override
   public OmBucketInfo getBucketInfo(String volume, String bucket)
       throws IOException {
+    return getBucketInfo(volume, bucket, false).getBucketInfo();
+  }
+
+  @Override
+  public BucketInfoWithVolumeContext getBucketInfo(String volume, String 
bucket, boolean assumeS3Context)
+      throws IOException {
+    String resolvedVolumeName = volume;
+    BucketInfoWithVolumeContext.Builder builder = 
BucketInfoWithVolumeContext.newBuilder();
+    if (assumeS3Context) {
+      S3VolumeContext context = getS3VolumeContext(true);
+      resolvedVolumeName = context.getOmVolumeArgs().getVolume();
+      builder.setUserPrincipal(context.getUserPrincipal());
+    }
+    

Review Comment:
   nit: remove trailing whitespace



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