How to gracefully shutdown druid processes in a clustered deployment?

Relates to Apache Druid [0.21.1 release]

Is there any way to gracefully shutdown druid processes in a clustered deployment?

I use the below steps to kill(which is not graceful shutdown!!)

  1. ps -ef | grep “druid_home_path”
  2. kill -9 #using the pids obtained from above step

I think it depends on how you start it. If you use something like initd, you might be able to do a ‘service stop’ command. If you use supervise (in the bin directory), you can use bin/service --down, eg. (You can read bin/service - it’s a text script.) Otherwise, I haven’t tried, but maybe something nicer than ‘-9’. Maybe a kill -2 or -1 would work (or even just kill) if given time; if not, maybe kill -3 (but then you get core dump, iiuc).

I used bin/start-cluster--server (which executes bin/supervise ) to start the processes.

I tested bin/service --down and it works for all the processes(data/master/query)!

1 Like