Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to stop Services in a single host from a cluster?

How to stop Services in a single host from a cluster?

I have a use-case that I need to stop services in a particular host from a cluster. How to do that, and do we have any REST API to take care of it. I was able to do in the Cloudera manager, but using the REST API for stopping the. services, stops services in all host, whereas i need to do that only for one host. 

2 REPLIES 2
Highlighted

Re: How to stop Services in a single host from a cluster?

Expert Contributor

@sharathkumar13  Yes you can do something like below:

 

curl -X POST -u admin:admin 'http://hostname.com:7180/api/v12/clusters/testcluster/services/hive/commands/stop

 

Highlighted

Re: How to stop Services in a single host from a cluster?

Hi @GangWar

 

This seems to restart the services in all hosts. 

 

Ex:- I've Kafka running in 3 hosts in a cluster. If I execute this command, this is abruptly stopping the services on all hosts, whereas I want to stop only on the second host,  but not all. Can we have any such mechanism, by tweaking the body or header using REST API?. I don't see find any in the documentation related to this. 

Don't have an account?
Coming from Hortonworks? Activate your account here