Class BucketTool

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.s3a.s3guard.S3GuardTool
org.apache.hadoop.fs.s3a.tools.BucketTool
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public final class BucketTool extends S3GuardTool
Bucket operations, e.g. create/delete/probe.
  • Field Details

  • Constructor Details

    • BucketTool

      public BucketTool(org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • getUsage

      public String getUsage()
      Specified by:
      getUsage in class S3GuardTool
    • getName

      public String getName()
      Description copied from class: S3GuardTool
      Return sub-command name.
      Specified by:
      getName in class S3GuardTool
      Returns:
      sub-command name.
    • run

      public int run(String[] args, PrintStream out) throws Exception, org.apache.hadoop.util.ExitUtil.ExitException
      Description copied from class: S3GuardTool
      Run the tool, capturing the output (if the tool supports that). As well as returning an exit code, the implementations can choose to throw an instance of ExitUtil.ExitException with their exit code set to the desired exit value. The exit code of such an exception is used for the tool's exit code, and the stack trace only logged at debug.
      Specified by:
      run in class S3GuardTool
      Parameters:
      args - argument list
      out - output stream
      Returns:
      the exit code to return.
      Throws:
      Exception - on any failure
      org.apache.hadoop.util.ExitUtil.ExitException
    • removeBucketOverrides

      public static void removeBucketOverrides(String bucket, org.apache.hadoop.conf.Configuration conf, String... options)
      Remove any values from a bucket.
      Parameters:
      bucket - bucket whose overrides are to be removed. Can be null/empty
      conf - config
      options - list of fs.s3a options to remove