Ozone shell supports the following bucket commands.
The bucket create
command allows users to create a bucket.
Params:
Arguments | Comment |
---|---|
-g, --enforcegdpr | Optional, if set to true it creates a GDPR compliant bucket, if not specified or set to false, it creates an ordinary bucket. |
-k, --bucketKey | Optional, if a bucket encryption key name from the configured KMS server is specified, the files in the bucket will be transparently encrypted. Instruction on KMS configuration can be found from Hadoop KMS document. |
Uri | The name of the bucket in /volume/bucket format. |
ozone sh bucket create /hive/jan
The above command will create a bucket called jan in the hive volume. Since no scheme was specified this command defaults to O3 (RPC) protocol.
The bucket delete
command allows users to delete a bucket. If the
bucket is not empty then this command will fail.
Params:
Arguments | Comment |
---|---|
Uri | The name of the bucket |
ozone sh bucket delete /hive/jan
The above command will delete jan bucket if it is empty.
The bucket info
commands returns the information about the bucket.
Params:
Arguments | Comment |
---|---|
Uri | The name of the bucket. |
ozone sh bucket info /hive/jan
The above command will print out the information about jan bucket.
The bucket list
command allows users to list the buckets in a volume.
Params:
Arguments | Comment |
---|---|
-l, --length | Maximum number of results to return. Default: 100 |
-p, --prefix | Optional, Only buckets that match this prefix will be returned. |
-s, --start | The listing will start from key after the start key. |
Uri | The name of the volume. |
ozone sh bucket list /hive
This command will list all buckets on the volume hive.
Next >>