jojochuang commented on code in PR #9110:
URL: https://github.com/apache/ozone/pull/9110#discussion_r2593979847
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -125,54 +125,37 @@ public Response get(
@QueryParam("upload-id-marker") String uploadIdMarker,
@DefaultValue("1000") @QueryParam("max-uploads") int maxUploads) throws
OS3Exception, IOException {
long startNanos = Time.monotonicNowNanos();
- S3GAction s3GAction = S3GAction.GET_BUCKET;
- PerformanceStringBuilder perf = new PerformanceStringBuilder();
- Iterator<? extends OzoneKey> ozoneKeyIterator = null;
- ContinueToken decodedToken =
- ContinueToken.decodeFromString(continueToken);
- OzoneBucket bucket = null;
-
- try {
- if (aclMarker != null) {
- s3GAction = S3GAction.GET_ACL;
- S3BucketAcl result = getAcl(bucketName);
- getMetrics().updateGetAclSuccessStats(startNanos);
- AUDIT.logReadSuccess(
- buildAuditMessageForSuccess(s3GAction, getAuditParameters()));
- return Response.ok(result, MediaType.APPLICATION_XML_TYPE).build();
- }
-
- if (uploads != null) {
- s3GAction = S3GAction.LIST_MULTIPART_UPLOAD;
- return listMultipartUploads(bucketName, prefix, keyMarker,
uploadIdMarker, maxUploads);
- }
+ // Handle ACL requests
+ if (aclMarker != null) {
+ return handleGetBucketAcl(bucketName, startNanos);
+ }
- maxKeys = validateMaxKeys(maxKeys);
+ // Handle multipart uploads requests
+ if (uploads != null) {
+ return listMultipartUploads(bucketName, prefix, keyMarker,
uploadIdMarker, maxUploads);
+ }
- if (prefix == null) {
- prefix = "";
- }
+ // Actual bucket processing starts here
+ S3GAction s3GAction = S3GAction.GET_BUCKET;
Review Comment:
these lines should go into the try block below.
--
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]