Created 03-04-2024 09:37 AM
I'm looking to administer HDFS and Hive replication via API. The replication jobs have been set up. My question is, can these replication jobs be viewed in the Cloudera Manager UI under Replication Policies?
Created 03-04-2024 02:39 PM
Hello,
May you provide the CDP/CM version and what API are you using as example ?
* Since the jobs execution and jobs are maintained in the DB I would say they should appear in the CM UI, yes.
Created 03-05-2024 02:54 AM
I am using CM 7.11.3 with CDP 7.1.9 and Cloudera Manager Rest API.
Created 03-05-2024 05:56 AM
@naymar after setting up the replication jobs, they should be visible in the CM UI.
In CM version 6.x and 5.15.x, under Backup > Replication Schedules and for CM 7, under Replication > Replication Policies.
They're also stored in the backend DB. You can check them with:
SELECT COMMAND_NAME,SERVICE_ID,START_TIME,DISPLAY_NAME,DESCRIPTION FROM COMMAND_SCHEDULES;
If you want to check the arguments you set:
SELECT COMMAND_NAME,SERVICE_ID,COMMAND_ARGUMENTS,START_TIME,DISPLAY_NAME,DESCRIPTION FROM COMMAND_SCHEDULES;
If you want to check only the HDFS replication schedules:
SELECT COMMAND_NAME,SERVICE_ID,COMMAND_ARGUMENTS,START_TIME,DISPLAY_NAME,DESCRIPTION FROM COMMAND_SCHEDULES WHERE COMMAND_NAME='HdfsReplicationCommand';
On the below TSB article, you can refer yourself to some of the API used to fetch the replications from the CM UI (:warning:NOTE: the TSB will prompt you to enter your Cloudera credentials)
For instance, using the URL example, the following curl command should return the history of policies:
curl -X GET “http://hostname:7180/api/v49/clusters/Cluster%201/services/HIVE-1/replications?view=summary" -H "accept: application/json"
Also, the below API should give a you a list of all the replications setup in the CM
http[s]://hostname[:port]/api/v49/clusters/<clusterName>/services/<serviceName>/replications
Created 03-08-2024 11:16 AM
@naymar Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.
Regards,
Diana Torres,