Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Managing Replication Using API

avatar
Explorer

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?

4 REPLIES 4

avatar
Contributor

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.

avatar
Explorer

I am using CM 7.11.3 with CDP 7.1.9 and Cloudera Manager Rest API.

avatar
Expert Contributor

@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)

https://my.cloudera.com/knowledge/TSB-2024-734-The-Replication-Policies-page-of-Replication?id=38262... 

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

avatar
Community Manager

@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,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: