Support Questions
Find answers, ask questions, and share your expertise

Identify edge node using Cloudera Manager CM API

Identify edge node using Cloudera Manager CM API

Explorer

Hi,

 

I would like to know if it is possible to get following information using Cloudera Manager CM API.

 

1)  How to get IP address of edge/gateway node in a cluster using CM API ?


2)  How to identify the node where a specific services(eg: Hive thriftServer, Solr, impala etc) is up and running ?

 

3)  Whether a specific service would be up and running in more than one node(eg: imapala) ?


4)  How to get the port where a specific services(eg: Hive thriftServer, Solr, impala etc) is listening?
    (i know there would be a default port and hadoop admin can change the value if needed.  But, would like to get the port number using CM API)

 

thanks,

nks

1 REPLY 1

Re: Identify edge node using Cloudera Manager CM API

Super Collaborator

1. Filter Service/Roles GATEWAY [1a,b] roles and get hostRef. Use the hostRef to filter the hosts [2a,b] to get the IP

2. Filter Service/Roles per your example HIVE/HIVESERVER2 [1a]

3. Filter Service/Roles per your example HIVE/HIVESERVER2  [1a,b] and look for the "roleState"

4. Filter Service/Roles per your example HIVE/HIVESERVER2  [3] and look for the Service "config" [3], "roleConfigGroup" [4] 

 

 

[1a] https://cloudera.github.io/cm_api/apidocs/v11/path__clusters_-clusterName-_services_-serviceName-_ro...

[1b] https://cloudera.github.io/cm_api/apidocs/v11/ns0_apiRole.html

[2a] https://cloudera.github.io/cm_api/apidocs/v11/ns0_apiHost.html

[2b] https://cloudera.github.io/cm_api/apidocs/v11/path__hosts.html

[3] https://cloudera.github.io/cm_api/apidocs/v11/ns0_apiConfig.html

[4] https://cloudera.github.io/cm_api/apidocs/v11/path__clusters_-clusterName-_services_-serviceName-_ro...