ivandika3 commented on code in PR #9798:
URL: https://github.com/apache/ozone/pull/9798#discussion_r2837099951


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/S3RequestContext.java:
##########
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.ozone.s3.endpoint;
+
+import jakarta.annotation.Nullable;
+import java.io.IOException;
+import org.apache.hadoop.ozone.audit.AuditLogger.PerformanceStringBuilder;
+import org.apache.hadoop.ozone.audit.S3GAction;
+import org.apache.hadoop.ozone.client.OzoneVolume;
+import org.apache.hadoop.util.Time;
+
+class S3RequestContext {
+  private final long startNanos;
+  private final PerformanceStringBuilder perf;
+  private final EndpointBase endpoint;
+  private S3GAction action;
+  private OzoneVolume volume;
+
+  S3RequestContext(EndpointBase endpoint, S3GAction action) {

Review Comment:
   Nit: Let's pull the Javadoc in `ObjectRequestContext` although I'm OK to 
leave it be.
   
   ```
   /** @param action best guess on action based on request method, may be 
refined later by handlers */
   ```



##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketAclHandler.java:
##########
@@ -75,15 +74,14 @@ private boolean shouldHandle() {
    * see: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAcl.html
    */
   @Override
-  public Response handleGetRequest(String bucketName)
+  Response handleGetRequest(S3RequestContext context, String bucketName)
       throws IOException, OS3Exception {
 
     if (!shouldHandle()) {
       return null;  // Not responsible for this request
     }

Review Comment:
   Technically, the `shouldHandle` can be refactored out, since it is part of 
the chain of responsibility framework instead of the S3 handler implementation. 
This can be addressed in follow-ups.



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