Jimmyweng006 commented on code in PR #8307:
URL: https://github.com/apache/ozone/pull/8307#discussion_r2061243426


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -292,6 +294,14 @@ public Response get(
     return Response.ok(response).build();
   }
 
+  private int validateMaxKeys(int maxKeys) throws OS3Exception {
+    if (maxKeys <= 0) {
+      throw S3ErrorTable.newError(S3ErrorTable.INVALID_ARGUMENT, "maxKeys must 
be > 0");
+    }
+
+    return Math.min(maxKeys, 1000);

Review Comment:
   I implement this function but not yet commit.
   
   If below statement is not wrong, should config maxKeys still need? Or for 
the purpose to reduce maxKeys like limit to 500(some number is smaller than 
1000)?
   
   
   > In AWS S3 ListObjects & ListObjectsV2 API reference, they both mention 
below.
   > 
   > > Returns some or all (up to 1,000) of the objects in a bucket.
   > 
   > Therefore I think add the maxKeys up to 1000 is appropriate.
   > 
   > reference: 
[ListObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
 
[ListObjectsV2](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
   
   



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to