hadoop/hadoop-hdds/docs/content/shell/BucketCommands.md
Nanda kumar b661dcf563 HDDS-2002. Update documentation for 0.4.1 release.
Signed-off-by: Anu Engineer <aengineer@apache.org>
2019-08-23 19:04:13 -07:00

3.2 KiB

title summary weight
Bucket Commands Bucket commands help you to manage the life cycle of a volume. 2

Ozone shell supports the following bucket commands.

Create

The bucket create command allows users to create a bucket.

Params:

Arguments Comment
Uri The name of the bucket in /volume/bucket format.

{{< highlight bash >}} ozone sh bucket create /hive/jan {{< /highlight >}}

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.

Delete

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

{{< highlight bash >}} ozone sh bucket delete /hive/jan {{< /highlight >}}

The above command will delete jan bucket if it is empty.

Info

The bucket info commands returns the information about the bucket.

Params:

Arguments Comment
Uri The name of the bucket.

{{< highlight bash >}} ozone sh bucket info /hive/jan {{< /highlight >}}

The above command will print out the information about jan bucket.

List

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.

{{< highlight bash >}} ozone sh bucket list /hive {{< /highlight >}}

This command will list all buckets on the volume hive.