Created on 11-16-2014 11:00 PM - edited 09-16-2022 02:13 AM
how to stop all cloudera cluster services command line in single command?
We have CDH5.2 cluster setup using CM. We are assigned a task to write automation script to run TestDFSIO benchmark.
The tests needs to be run multiple time with pristine environment for diff. set of data size.
To achieve this I need to stop and start cluster each time before starting with TestDFSIO commands.
Want to know what is a single command using which I could stop all cluster services? It should be similar to what is called after clicking on "STOP" cluster and "START" cluster button on CM home page.
Created 11-17-2014 01:00 PM
You can use the API to stop and then subsequently start the cluster programatically if you'd like.
The one question I have is why you feel it is required to restart all the services in between test runs. Is it because you want to make sure heap is cleared and just assure there are no lingering file handles/etc. from the last job?
Created 11-17-2014 01:00 PM
You can use the API to stop and then subsequently start the cluster programatically if you'd like.
The one question I have is why you feel it is required to restart all the services in between test runs. Is it because you want to make sure heap is cleared and just assure there are no lingering file handles/etc. from the last job?
Created 11-17-2014 10:02 PM
Thanks Clint.
I need to do this because I want each benchmark test to be run in pritine environment.
Created 11-17-2014 10:05 PM
Created 07-07-2016 11:59 PM
Is there any CLI command available too? for doing the Services management. Its good when need to manage services automated using Cloudera Manager.
Created 08-03-2016 06:58 AM
You can stop the services with the following: (another option is just to use restart, I like stop, verify all processes are gone/down then do the start when needed.)
Cloudera Manager Server: (stop agent, stop the server, stop database if using local postgres default )
sudo /sbin/service cloudera-scm-agent stop
sudo /sbin/service cloudera-scm-server stop
sudo /sbin/service cloudera-scm-server-db stop
Do the reverse to start:
sudo /sbin/service cloudera-scm-server-db start
sudo /sbin/service cloudera-scm-server start
sudo /sbin/service cloudera-scm-agent start
On the other nodes of your servers in the cluster just stop/restart the agent.
sudo /sbin/service cloudera-scm-agent stop
sudo /sbin/service cloudera-scm-agent start
or
sudo /sbin/service cloudera-scm-agent restart
You can do the following to get a status of the services as well.
sudo /sbin/service cloudera-scm-server-db status
sudo /sbin/service cloudera-scm-server status
sudo /sbin/service cloudera-scm-agent status
May want to do a ps -ef |grep cloudera-scm to verify all processes are stopped on each server.