- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Managing Replication Using API
Created 03-04-2024 09:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using CM 7.11.3 with CDP 7.1.9 and Cloudera Manager Rest API.
Created 03-05-2024 05:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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:
