Creating Hive replication policy using CDP CLI

You can use CDP CLI to create an Hive replication policy.

  1. Log into Replication Manager CDP CLI setup using the cdp --profile [***profile-name***] replicationmanager command.
  2. List the clusters to verify whether the required source cluster is available using the cdp --profile [***profile-name***] replicationmanager list-clusters command.
    The destination cluster CRN is required to create a Hive replication policy.
  3. Verify whether the required services are running on the source cluster using the cdp --profile [***profile-name***] replicationmanager list-cluster-service-statuses command.
  4. Ensure that the cloud credentials are available using the cdp --profile [***profile-name***] replicationmanager list-all-credentials command.
  5. Open a policy definition JSON file, enter the required parameters to create a policy definition JSON file, and save the file.
  6. Run the cdp --profile [***profile_name***] replicationmanager create-policy --cli-input-json [****policy definition json file path using cat***] command to create a replication policy.

    For example: cdp --profile local-dev replicationmanager create-policy --cli-input-json “$(cat temp/rm_hive_3.json)”

To verify whether the policy is created and running as expected, run the cdp --profile [***profile_name***] replicationmanager list-policies command. You can also open the Replication Manager web interface to view the policy status on the Replication Policies page.