key put

Definition

Adds a key with file contents to a bucket.

Usage

$ ozone sh key put [-hV] [--stream]
                         [-r=<replication>]
                         [-t=<type>]
                         <value>
                         <fileName>
Arguments
Parameter Description

value

A key URI. It can be a full URI (starts with o3://, e.g. o3://hostname:9862/vol1/bucket1/key1) or a short URI (starts with a volume name, e.g. vol1/bucket1/key1). Any missing information is obtained from the configuration files

replication

Replication definition. The valid values are based on the replication type. For RATIS: ONE or THREE. In case of EC, it should follow the CODEC-DATA-PARITY-CHUNKSIZE pattern, e.g. rs-3-2-1024k

type

Replication type. The supported types are RATIS and EC

fileName

Path to the file whose contents should be uploaded to a key

--stream

Specifies whether to use Streaming Write Pipeline

-h, --help

Prints out a help manual for this command

-V, --version

Prints out version information and exits

Examples

Consider a volume vol1 with a bucket bucket1 created within. To add a key to that bucket, call the following command:

$ ozone sh key put vol1/bucket1/key1 testFile.txt --stream
Found a mistake? Seleсt text and press Ctrl+Enter to report it