Create a Replication Policy.




Creates a new replication policy with the given name on a specific cluster.


--cluster-crn <value>
--policy-name <value>
--policy-definition <value>
[--cli-input-json <value>]


--cluster-crn (string)

CRN of the cluster where the policy will be created.

--policy-name (string)

Name of the new policy.

--policy-definition (object)

Policy creation request definition.

name -> (string)

Name of the new policy.

type -> (string)

Policy replication type.

sourceDataset -> (object)

Extra properties for the source dataset.

hdfsArguments -> (object)

Extra properties for HDFS.

path -> (string)

HDFS path. Mandatory for HDFS policies, otherwise optional.

replicationStrategy -> (string)

Replication strategy.

mapReduceService -> (string)

Name of the mapreduce service.

logPath -> (string)

Job log path.

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)


extendedAttributes -> (boolean)

Extended attributes.

deletePolicy -> (string)

Deletion behavior.

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)

Dataset to replicate to.

cloudCredential -> (string)

Cloud credentials to use if replicating to Cloud.

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”.

startTime -> (datetime)

Start time.

endTime -> (datetime)

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)

TDE same key.

description -> (string)

Description of the policy.

enableSnapshotBasedReplication -> (boolean)

Enable snapshot based replication.

cloudEncryptionAlgorithm -> (string)

Cloud encryption algorithm.

cloudEncryptionKey -> (string)

Cloud encryption key.

plugins -> (array)


item -> (string)

hiveExternalTableBaseDirectory -> (string)

Hive external table base directory.

cmPolicySubmitUser -> (object)

CM Policy submit user.

userName -> (string)


sourceUser -> (string)

Source user.

JSON Syntax:

  "name": "string",
  "type": "FS"|"HIVE"|"HBASE",
  "sourceDataset": {
    "hdfsArguments": {
      "path": "string",
      "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
      "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",
  "cloudCredential": "string",
  "sourceCluster": "string",
  "targetCluster": "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.


Form Factors