diff --git a/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java b/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java index d897642e646c..2ce5c2859443 100644 --- a/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java +++ b/core/server/proxy/src/main/java/alluxio/proxy/s3/S3RestServiceHandler.java @@ -272,6 +272,7 @@ public Response headBucket( * @param acl query string to indicate if this is for GetBucketAcl * @param policy query string to indicate if this is for GetBucketPolicy * @param policyStatus query string to indicate if this is for GetBucketPolicyStatus + * @param location query parameter to indicate if this is for GetBucketLocation * @param uploads query string to indicate if this is for ListMultipartUploads * @return the response object */ @@ -290,6 +291,7 @@ public Response getBucket(@PathParam("bucket") final String bucket, @QueryParam("acl") final String acl, @QueryParam("policy") final String policy, @QueryParam("policyStatus") final String policyStatus, + @QueryParam("location") final String location, @QueryParam("uploads") final String uploads) { return S3RestUtils.call(bucket, () -> { Preconditions.checkNotNull(bucket, "required 'bucket' parameter is missing"); @@ -311,6 +313,12 @@ public Response getBucket(@PathParam("bucket") final String bucket, "GetBucketPolicyStatus is not currently supported.", S3ErrorCode.INTERNAL_ERROR.getStatus())); } + if (location != null) { + throw new S3Exception(bucket, new S3ErrorCode( + S3ErrorCode.NOT_IMPLEMENTED.getCode(), + "GetBucketLocation is not currently supported.", + S3ErrorCode.NOT_IMPLEMENTED.getStatus())); + } String path = S3RestUtils.parsePath(AlluxioURI.SEPARATOR + bucket); final String user = getUser();