create-hbase-policy¶
- subtitle
Create an HBase Replication Policy.
- version
0.9.128
Description¶
Creates a new HBase replication policy with the given name on a specific cluster.
Synopsis¶
create-hbase-policy
--cluster-crn <value>
--policy-name <value>
--policy-definition <value>
[--cli-input-json <value>]
[--generate-cli-skeleton]
Options¶
--cluster-crn
(string)
CRN of the destination cluster.
--policy-name
(string)
Name of the new policy.
--policy-definition
(object)
HBase policy definition.
hbasePolicyArguments -> (object)
HBase replication parameters.
tables -> (array)
List of tables to be replicated. The key should be in “namespace:tablename” format. If this list is empty, then the whole database will be replicated.
item -> (string)
credentialLocation -> (string)
Location of the credentials provided for initial snapshots. Setting it to ‘SAFETY_VALVE’ indicates that the credentials are available in safety valves on the source cluster, otherwise credentials have to be defined in the ‘cloudCredential’ property. Defaults to ‘EXTERNAL_ACCOUNT’.
cloudCredential -> (string)
Cloud credentials to use to replicate the initial snapshot if the credential location is specified as ‘EXTERNAL_ACCOUNT’.
validateReplicationSetup -> (boolean)
Whether to validate replication setup after policy creation.
forceSetup -> (boolean)
Whether setup should be forced if one of the clusters is already paired with another cluster. Forced setup is only possible if either there are no HBase replication policies between the pair or if the other cluster in the pair is currently unreachable. Note that when set to ‘true’ the existing pairing for the selected source or target cluster will be cleared and the first-time setup will be initiated with the chosen new source or destination cluster.
databaseArguments -> (object)
HBase database replication arguments.
replicationStrategy -> (string)
Whether to replicate all tables or only the ones where the replication scope has been set. Defaults to ALL_TABLES.
sourceCluster -> (string)
Name of source cluster in the format: “dataCenterName$cluster name”, for example “DC-Europe$My Source 42.”
targetCluster -> (string)
Name of destination cluster in the format: “dataCenterName$cluster name”, for example “DC-US$My Destination 17”.
initialSnapshot -> (boolean)
If set to true, the current data in the table will be replicated before the HBase replication peer gets enabled. If set to false, only the data changed after the policy creation will be replicated.
exportSnapshotUser -> (string)
If set, the user specified by this parameter will be used to export the initial snapshot on the source.
description -> (string)
Description of the policy.
machineUser -> (object)
Username and password for the machine user.
user -> (string)
Username.
password -> (string)
Password.
createUser -> (boolean)
This option has no effect if the machine user already exists. Otherwise if ‘true’, a new machine user is created. If ‘false’, an error is returned indicating that the user does not exist.
queueName -> (string)
YARN queue name to use for initial snapshot if not default.
distcpMaxMaps -> (integer)
Maximum Map jobs to use for initial snapshot.
distcpMapBandwidth -> (integer)
Maximum bandwidth per mapper to use for initial snapshot.
sourceRestartType -> (string)
Type of restart for a cluster.
targetRestartType -> (string)
Type of restart for a cluster.
Shorthand Syntax:
hbasePolicyArguments={tables=[string,string],credentialLocation=string,cloudCredential=string,validateReplicationSetup=boolean,forceSetup=boolean,databaseArguments={replicationStrategy=string}},sourceCluster=string,targetCluster=string,initialSnapshot=boolean,exportSnapshotUser=string,description=string,machineUser={user=string,password=string,createUser=boolean},queueName=string,distcpMaxMaps=integer,distcpMapBandwidth=integer,sourceRestartType=string,targetRestartType=string
JSON Syntax:
{
"hbasePolicyArguments": {
"tables": ["string", ...],
"credentialLocation": "EXTERNAL_ACCOUNT"|"SAFETY_VALVE",
"cloudCredential": "string",
"validateReplicationSetup": true|false,
"forceSetup": true|false,
"databaseArguments": {
"replicationStrategy": "ALL_TABLES"|"TABLES_WITH_REPLICATION_SCOPE_SET"
}
},
"sourceCluster": "string",
"targetCluster": "string",
"initialSnapshot": true|false,
"exportSnapshotUser": "string",
"description": "string",
"machineUser": {
"user": "string",
"password": "string",
"createUser": true|false
},
"queueName": "string",
"distcpMaxMaps": integer,
"distcpMapBandwidth": integer,
"sourceRestartType": "RESTART"|"ROLLING_RESTART",
"targetRestartType": "RESTART"|"ROLLING_RESTART"
}
--cli-input-json
(string)
Performs service operation based on the JSON string provided. The JSON string follows the format provided by
--generate-cli-skeleton
. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.
--generate-cli-skeleton
(boolean)
Prints a sample input JSON to standard output. Note the specified operation is not run if this argument is specified. The sample input can be used as an argument for
--cli-input-json
.
Output¶
clusterCrn -> (string)
The CRN of the input cluster.
message -> (string)
The detailed description of the action taken.
status -> (string)
The status of the request.
Form Factors¶
public