adoroszlai commented on code in PR #9537:
URL: https://github.com/apache/ozone/pull/9537#discussion_r2637354520
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -106,28 +105,28 @@ public class BucketEndpoint extends EndpointBase {
@GET
@SuppressWarnings("methodlength")
public Response get(
- @PathParam(BUCKET) String bucketName,
- @DefaultValue("1000") @QueryParam(QueryParams.MAX_KEYS) int maxKeys,
- @DefaultValue("1000") @QueryParam(QueryParams.MAX_UPLOADS) int maxUploads
+ @PathParam(BUCKET) String bucketName
) throws OS3Exception, IOException {
long startNanos = Time.monotonicNowNanos();
S3GAction s3GAction = S3GAction.GET_BUCKET;
PerformanceStringBuilder perf = new PerformanceStringBuilder();
- final String continueToken = getQueryParam(QueryParams.CONTINUATION_TOKEN);
- final String delimiter = getQueryParam(QueryParams.DELIMITER);
- final String encodingType = getQueryParam(QueryParams.ENCODING_TYPE);
- final String marker = getQueryParam(QueryParams.MARKER);
- String prefix = getQueryParam(QueryParams.PREFIX);
- String startAfter = getQueryParam(QueryParams.START_AFTER);
+ final String continueToken =
queryParams().get(QueryParams.CONTINUATION_TOKEN);
+ final String delimiter = queryParams().get(QueryParams.DELIMITER);
+ final String encodingType = queryParams().get(QueryParams.ENCODING_TYPE);
+ final String marker = queryParams().get(QueryParams.MARKER);
+ int maxKeys = queryParams().getInt(QueryParams.MAX_KEYS, 1000);
+ final int maxUploads = queryParams().getInt(QueryParams.MAX_UPLOADS, 1000);
Review Comment:
We can translate to `WebApplicationException(400)`, but doing so for every
type seems cumbersome. Then it may be better to create a new converter just
for params, initially supporting only `getInt`/`setInt`.
--
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]