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 c3ebc48bb776..61c88292bd5b 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 @@ -287,6 +287,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 */ @@ -306,6 +307,7 @@ public Response getBucket(@HeaderParam("Authorization") final String authorizati @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"); @@ -327,6 +329,12 @@ public Response getBucket(@HeaderParam("Authorization") final String authorizati "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(authorization);