Member since
08-02-2021
1
Post
0
Kudos Received
0
Solutions
08-03-2021
07:54 AM
@devdb Take a look of this may be it can help : https://archive.cloudera.com/cm7/7.2.4/generic/jar/cm_api/apidocs/ Also you can get the hosts details from this : http://CM-SERVER:7180/api/v19/clusters/cluster1/services For each ‘hosts’ in http://cm:7180/api/v19/hosts iterate through the hostId … { "items" : [ { "maintenanceOwners" : [ ], "hostId" : "15b5c47f-9156-4347-abd4-efbc79d27ba2", <=== hostid "ipAddress" : "IP", "hostname" : "host", http://cm:7180/api/v19/hosts/15b5c47f-9156-4347-abd4-efbc79d27ba2. which should give you the roleName ... { "clusterName" : "Cluster 1", "serviceName" : "HDFS-1", "roleName" : "HDFS-1-DATANODE-d1ee4c53b9fbc4786263f0420c5157e8" }, { ... using the roleName http://cm:7180/api/v19/clusters/Cluster%201/services/HDFS-1/roles/HDFS-1-DATANODE-d1ee4c53b9fbc4786263f0420c5157e8 Also full deployment details http://cm:7180/api/v19/cm/deployment
... View more