The SHUTDOWN statement performs a graceful shutdown of Impala Daemon. The Impala daemon will notify other Impala daemons that it is shutting down, wait for a grace period, then shut itself down once no more queries or fragments are executing on that daemon. The --shutdown_grace_period_s flag determines the duration of the grace period in seconds.
:SHUTDOWN() :SHUTDOWN([host_name[:port_number] ) :SHUTDOWN(deadline) :SHUTDOWN([host_name[:port_number], deadline)
All arguments are optional for SHUTDOWN.
|host_name||STRING||The current impalad host||
Address of the backend to be shut down.
|port_number||INT||0 which is treated the same port as current impalad||n/a|
|deadline||INT||The value of the --shutdown_deadline_s flag, which defaults to 1 hour.||
deadline must be a non-negative number, specified in seconds.
The value, 0, for deadline specifies an immediate shutdown.
Take the following points into consideration when running the SHUTDOWN statement:
- A client can shut down the coordinator impalad that it is connected to via :SHUTDOWN().
- A client can remotely shut down another non-coordinator impalad via :SHUTDOWN('hostname').
- The shutdown time limit can be overridden to force a quicker or slower shutdown by specifying a deadline. The default deadline is determined by the --shutdown_deadline_s flag, which defaults to 1 hour.
- Executors can be shut down without disrupting running queries. Short-running queries will finish, and long-running queries will continue until a threshold time limit is reached.
- If queries are submitted to a coordinator after shutdown of that coordinator has started, they will fail.
- Long running queries or other issues, such as stuck fragments, will slow down but not prevent eventual shutdown.
The ALL privilege is required on the server.
Cancellation: Cannot be cancelled.
:SHUTDOWN(); -- Shut down the current impalad with the default deadline. :SHUTDOWN('hostname'); -- Shut down impalad running on hostname with the default deadline. :SHUTDOWN(\"hostname:1234\"); -- Shut down impalad running on host at port 1234 with the default deadline. :SHUTDOWN(10); - Shut down the current impalad after 10 seconds. :SHUTDOWN('hostname', 10); - Shut down impalad running on hostname when all queries running on hostname finish, or after 10 seconds. :SHUTDOWN('hostname:11', 10 * 60); -- Shut down impalad running on hostname at port 11 when all queries running on hostname finish, or after 600 seconds. :SHUTDOWN(0); -- Perform an immdediate shutdown of the current impalad.
Added in: CDH 6.1