Created on 03-12-2016 09:29 AM - edited 09-16-2022 03:08 AM
Hi
Where does Cloudera manager store restart of services information in the database ? We are using the default postgres database.
Thanks
Srikrishna
Created 03-21-2016 02:15 AM
Hi
Thanks . Based on the github , I am able to get all hosts ,ip . For eg if some of the hosts are down ,Is there is an API call to check ?
ip hostname down
ip hostname up
srikrishna
Python 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from cm_api.api_client import ApiResource >>> api = ApiResource('rhel62-1.ent.cloudera.com', 7180, 'admin', 'admin') >>> for h in api.get_all_hosts(): ... print h.hostname ... rhel62-2.ent.cloudera.com rhel62-4.ent.cloudera.com rhel62-3.ent.cloudera.com rhel62-1.ent.cloudera.com >>>
Created 03-15-2016 09:08 AM
Can you summarise your end goal, so I can provide you with an appropriate information.
Created 03-16-2016 11:59 AM
Thanks for your response. We are building a custom UI to display messages when cloudera manager stops/starts the services through API. Is it possible to stop individual services through API. rather than all ? .
Is there a specific table it stores relevant data for us to query and check?
We are interested to understand through API., what role each node belongs to ? What is the API call.?
Sorry for so many questions . I appreciate your response.
Created 03-16-2016 02:48 PM
Yes you can stop service and it's individual roles via CM API [1]
> Is there a specific table it stores relevant data for us to query and check?
Service status can be check directly from the CM API querying the relevant endpoint, specifically for the service you'd need to GET (open your browser) to the service endpoint [2] which will give you its state [3]
As a start point you could see the example [4a][4b]
[1] https://github.com/cloudera/cm_api/wiki/Start-Stop-Restart-JobTracker-Role
[3] https://cloudera.github.io/cm_api/apidocs/v11/ns0_apiServiceState.html
[4a] https://github.com/cloudera/cm_api/tree/master/python/examples
Created 03-21-2016 02:15 AM
Hi
Thanks . Based on the github , I am able to get all hosts ,ip . For eg if some of the hosts are down ,Is there is an API call to check ?
ip hostname down
ip hostname up
srikrishna
Python 2.7.2+ (default, Oct 4 2011, 20:06:09) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from cm_api.api_client import ApiResource >>> api = ApiResource('rhel62-1.ent.cloudera.com', 7180, 'admin', 'admin') >>> for h in api.get_all_hosts(): ... print h.hostname ... rhel62-2.ent.cloudera.com rhel62-4.ent.cloudera.com rhel62-3.ent.cloudera.com rhel62-1.ent.cloudera.com >>>