update-policy¶
- subtitle
Update a Replication Policy.
- version
0.9.126
Description¶
Updates an existing replication policy with the given parameters on a specific cluster.
Synopsis¶
update-policy
--cluster-crn <value>
--policy-id <value>
--update-policy-definition <value>
[--cli-input-json <value>]
[--generate-cli-skeleton]
Options¶
--cluster-crn
(string)
The CRN of the cluster where the policy will be updated.
--policy-id
(string)
The ID of the policy to be updated.
--update-policy-definition
(object)
Policy update request definition.
name -> (string)
The policy name.
suspend -> (boolean)
Whether to suspend the policy. Changing this is the same as using suspend-policy (suspend = true) and activate-policy (suspend = false).
sourceUpdateDataset -> (object)
Extra properties for updating the source dataset.
hdfsArguments -> (object)
Updatable HDFS properties.
replicationStrategy -> (string)
Replication strategy.
mapReduceService -> (string)
The name of the MapReduce service.
logPath -> (string)
The HDFS path where the replication log files should be written to.
errorHandling -> (object)
Error handling behavior.
skipChecksumChecks -> (boolean)
Skip checksum checks.
skipListingChecksumChecks -> (boolean)
Skip checksum checks for copy-listing.
abortOnError -> (boolean)
Abort policy on error.
abortOnSnapshotDiffFailures -> (boolean)
Abort policy if there are snapshot diff failures.
preserve -> (object)
Properties to preserve after replication.
blockSize -> (boolean)
Block size.
replicationCount -> (boolean)
Replication count.
permissions -> (boolean)
Permissions.
extendedAttributes -> (boolean)
Extended attributes.
deletePolicy -> (string)
Deletion behavior for the target side when files are removed on the source side. KEEP_DELETED_FILES:Keep deleted source files on the target, DELETE_TO_TRASH:Remove the deleted source files to trash on the target, DELETE_PERMANENTLY:Permanently remove deleted files on the target.
alert -> (object)
Cloudera Manager alerting behavior.
onFailure -> (boolean)
Alert on failure.
onStart -> (boolean)
Alert on start.
onSuccess -> (boolean)
ALert on success.
onAbort -> (boolean)
Alert on abort.
exclusionFilters -> (array)
Exclusion filters in glob format.
item -> (string)
hiveArguments -> (object)
Hive replication arguments.
databasesAndTables -> (array)
Scope of the replication.
item -> (object)
Hive replication scope.
database -> (string)
Database to replicate.
tablesIncludeRegex -> (string)
Regex to match included tables.
tablesExcludeRegex -> (string)
Regex to match excluded tables.
sentryPermissions -> (string)
Include or exclude Sentry permissions.
skipUrlPermissions -> (boolean)
Skip URL permissions.
numThreads -> (integer)
Number of threads to use during replication.
frequencyInSec -> (integer)
Policy’s frequency in seconds.
targetDataset -> (string)
The path of the dataset to replicate to.
startTime -> (datetime)
Policy start time.
endTime -> (datetime)
Policy end time.
distcpMaxMaps -> (integer)
Maximum Map jobs to use for replication.
distcpMapBandwidth -> (integer)
Maximum bandwidth to use for replication.
queueName -> (string)
YARN queue name if not default.
tdeSameKey -> (boolean)
Whether to use TDE same key.
description -> (string)
Description of the policy.
enableSnapshotBasedReplication -> (boolean)
Whether to enable snapshot based replication.
cloudEncryptionAlgorithm -> (string)
The type of cloud encryption algorithm. Can be used only for HDP/Ambari managed clusters. Supported values are AES256,SSE-KMS.
cloudEncryptionKey -> (string)
The encryption key for the selected cloud encryption algorithm.
plugins -> (array)
The list of plugins.
item -> (string)
hiveExternalTableBaseDirectory -> (string)
The base directory path on the target where to put the replicated Hive external tables.
cmPolicySubmitUser -> (object)
CM Policy submit user.
userName -> (string)
Username.
sourceUser -> (string)
Source user.
JSON Syntax:
{
"name": "string",
"suspend": true|false,
"sourceUpdateDataset": {
"hdfsArguments": {
"replicationStrategy": "DYNAMIC"|"STATIC",
"mapReduceService": "string",
"logPath": "string",
"errorHandling": {
"skipChecksumChecks": true|false,
"skipListingChecksumChecks": true|false,
"abortOnError": true|false,
"abortOnSnapshotDiffFailures": true|false
},
"preserve": {
"blockSize": true|false,
"replicationCount": true|false,
"permissions": true|false,
"extendedAttributes": true|false
},
"deletePolicy": "KEEP_DELETED_FILES"|"DELETE_TO_TRASH"|"DELETE_PERMANENTLY",
"alert": {
"onFailure": true|false,
"onStart": true|false,
"onSuccess": true|false,
"onAbort": true|false
},
"exclusionFilters": ["string", ...]
},
"hiveArguments": {
"databasesAndTables": [
{
"database": "string",
"tablesIncludeRegex": "string",
"tablesExcludeRegex": "string"
}
...
],
"sentryPermissions": "INCLUDE"|"EXCLUDE",
"skipUrlPermissions": true|false,
"numThreads": integer
}
},
"frequencyInSec": integer,
"targetDataset": "string",
"startTime": datetime,
"endTime": datetime,
"distcpMaxMaps": integer,
"distcpMapBandwidth": integer,
"queueName": "string",
"tdeSameKey": true|false,
"description": "string",
"enableSnapshotBasedReplication": true|false,
"cloudEncryptionAlgorithm": "string",
"cloudEncryptionKey": "string",
"plugins": ["string", ...],
"hiveExternalTableBaseDirectory": "string",
"cmPolicySubmitUser": {
"userName": "string",
"sourceUser": "string"
}
}
--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.
requestId -> (string)
The ID of the request. Populated only for Ambari backend.
message -> (string)
The detailed description of the action taken.
status -> (string)
The status of the request (Successful or an error).
Form Factors¶
public