tier create
Creates a new tier.
Syntax
- CLI
maprcli tier create -name <tier_name> -type cold|ectier [ -url <tier_url> ] [ -credential <credentials_file_path> ] [ -tag <object_store_type> ] [ -credential_str <tier_credentials> ] [ -dbtopology <metadata_volume_path> ] [ -cluster <cluster_name> ]
- REST
Request Type POST Request URL http[s]://<host:port>/rest/tier/create?<parameters>
Usage
To create a warm tier:
maprcli tier create
[ -cluster <cluster_name> ]
-name <tier_name>
-type ectier
[ -dbtopology <path> ]
To create a cold tier:
maprcli tier create
[ -cluster <cluster_name> ]
-name <tier_name>
-type cold -url <tier_URL>
-credential|credential_str <credential>
[ -dbtopology <path> ]
[ -tag S3-AWS|S3-GCS|S3-HDS|S3-IBM|Azure-Blobs|S3-Others ]
NOTE
The
-tag
parameter is required for Azure.Parameters
Parameter | Description |
---|---|
cluster |
The name of the cluster on which to run the command. |
credential |
(For tier of type cold only) The path to the credentials file to use for
accessing the tier. The credentials file must already exist on the node from where
the tier is being created. For more information, see Setting up a Credentials File for Connecting to a Cold Tier Using the CLI or REST API. NOTE Either this or
-credential_str is required for creating a cold
tier. |
credential_str |
(For tier of type cold only) The credentials, access key and
secret key, bucket name, and region in JSON format. Either this or
-credential is required for creating a cold tier. |
dbtopology |
The rack path to the volume where metadata is stored in DB tables.
The default value is /data . |
name |
The name of the tier. |
tag |
(For tier of type cold only) The object store to connect to.
Value can be one of the following:
NOTE This parameter is required for Azure. |
type |
The type of tier to create. Value can be:
|
url |
(For tier of type cold only) The URL (or endpoint) of the tier
in the following format:
<protocol>://<IP|hostname>.<domain> . Fore more information,
see Specifying the Vendor/Object Store for a Cold Tier. When specifying the URL (for S3), use double quotes.If the protocol is
|
Examples
Create a cold tier for offloading to S3:
# /opt/mapr/bin/maprcli tier create -name ksTestCold -type cold -url "s3.amazonaws.com" -credential credentials.txt -json
{
"timestamp":1519669953410,
"timeofday":"2018-02-26 10:32:33.410 GMT-0800 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Successfully created tier: 'ksTestCold'"
]
}
# curl -X POST 'https://abc.sj.us:8443/rest/tier/create?name=ksTestCold&type=cold&url=s3.amazonaws.com&credential=/root/credentials.txt' --user <username>:<password>
{"timestamp":1519679457859,"timeofday":"2018-02-26 01:10:57.859 GMT-0800 PM","status":"OK","total":0,"data":[],"messages":["Successfully created tier: 'ksTestCold'"]}
Create a EC tier for offloading to a erasure coded volume on the Data Fabric cluster:
# /opt/mapr/bin/maprcli tier create -name ksTestEC -type ectier -json
{
"timestamp":1519664750448,
"timeofday":"2018-02-26 09:05:50.448 GMT-0800 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Successfully created tier: 'ksTestEC'"
]
}
# curl -X POST 'https://testserver.sj.us:8443/rest/tier/create?name=ksTestEC&type=ectier' --user <username>:<password>
{"timestamp":1519679884411,"timeofday":"2018-02-26 01:18:04.411 GMT-0800 PM","status":"OK","total":0,"data":[],"messages":["Successfully created tier: 'ksTestEC'"]}
Create a cold tier by sending the credentials as a string:
# maprcli tier create -name testCold -type cold -url "s3.amazon.com" -credential_str '{"bucketName":"testbucket","credentials":{"accessKey":"ABCDEFGHIJKLM","secretKey":"OPQRSTUVWXYZ"}}' -json
{
"timestamp":1526406945863,
"timeofday":"2018-05-15 10:55:45.863 GMT-0700 AM",
"status":"OK",
"total":0,
"data":[
],
"messages":[
"Successfully created tier: 'testCold'"
]
}
# curl -k -X POST 'https://abc.sj.us:8443/rest/tier/create?name=testCold&type=cold&url=s3.amazon.com&credential_str=%7B%22bucketName%22%3A%22testbucket%22%2C%22credentials%22%3A%7B%22accessKey%22%3A%ABCDEFGHIJKL%22%2C%22secretKey%22%3A%22OPQRSTUVWXYZ%22%7D%7D' --user mapr:mapr
{"timestamp":1526483636503,"timeofday":"2018-05-16 08:13:56.503 GMT-0700 AM","status":"OK","total":0,"data":[],"messages":["Successfully created tier: 'testCold'"]}