Class BucketEndpoint

java.lang.Object
org.apache.hadoop.ozone.s3.endpoint.EndpointBase
org.apache.hadoop.ozone.s3.endpoint.BucketEndpoint
All Implemented Interfaces:
org.apache.hadoop.ozone.audit.Auditor

@Path("/{bucket}") public class BucketEndpoint extends EndpointBase
Bucket level rest endpoints.
  • Constructor Details

    • BucketEndpoint

      public BucketEndpoint()
  • Method Details

    • get

      @GET public javax.ws.rs.core.Response get(@PathParam("bucket") String bucketName, @QueryParam("delimiter") String delimiter, @QueryParam("encoding-type") String encodingType, @QueryParam("marker") String marker, @DefaultValue("1000") @QueryParam("max-keys") int maxKeys, @QueryParam("prefix") String prefix, @QueryParam("continuation-token") String continueToken, @QueryParam("start-after") String startAfter, @QueryParam("uploads") String uploads, @QueryParam("acl") String aclMarker, @QueryParam("key-marker") String keyMarker, @QueryParam("upload-id-marker") String uploadIdMarker, @DefaultValue("1000") @QueryParam("max-uploads") int maxUploads) throws OS3Exception, IOException
      Rest endpoint to list objects in a specific bucket.

      See: https://docs.aws.amazon.com/AmazonS3/latest/API/v2-RESTBucketGET.html for more details.

      Throws:
      OS3Exception
      IOException
    • put

      @PUT public javax.ws.rs.core.Response put(@PathParam("bucket") String bucketName, @QueryParam("acl") String aclMarker, InputStream body) throws IOException, OS3Exception
      Throws:
      IOException
      OS3Exception
    • listMultipartUploads

      public javax.ws.rs.core.Response listMultipartUploads(String bucketName, String prefix, String keyMarker, String uploadIdMarker, int maxUploads) throws OS3Exception, IOException
      Throws:
      OS3Exception
      IOException
    • head

      @HEAD public javax.ws.rs.core.Response head(@PathParam("bucket") String bucketName) throws OS3Exception, IOException
      Rest endpoint to check the existence of a bucket.

      See: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEAD.html for more details.

      Throws:
      OS3Exception
      IOException
    • delete

      @DELETE public javax.ws.rs.core.Response delete(@PathParam("bucket") String bucketName) throws IOException, OS3Exception
      Rest endpoint to delete specific bucket.

      See: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETE.html for more details.

      Throws:
      IOException
      OS3Exception
    • multiDelete

      @POST @Produces("application/xml") public MultiDeleteResponse multiDelete(@PathParam("bucket") String bucketName, @QueryParam("delete") String delete, MultiDeleteRequest request) throws OS3Exception, IOException
      Implement multi delete.

      see: https://docs.aws.amazon .com/AmazonS3/latest/API/multiobjectdeleteapi.html

      Throws:
      OS3Exception
      IOException
    • getAcl

      public S3BucketAcl getAcl(String bucketName) throws OS3Exception, IOException
      Implement acl get.

      see: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAcl.html

      Throws:
      OS3Exception
      IOException
    • putAcl

      public javax.ws.rs.core.Response putAcl(String bucketName, InputStream body) throws IOException, OS3Exception
      Implement acl put.

      see: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html

      Throws:
      IOException
      OS3Exception
    • setOzoneConfiguration

      public void setOzoneConfiguration(org.apache.hadoop.hdds.conf.OzoneConfiguration config)
    • getOzoneConfiguration

      public org.apache.hadoop.hdds.conf.OzoneConfiguration getOzoneConfiguration()
    • setHeaders

      public void setHeaders(javax.ws.rs.core.HttpHeaders headers)
    • init

      @PostConstruct public void init()
      Specified by:
      init in class EndpointBase