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.
Syntax:
:SHUTDOWN()
:SHUTDOWN([host_name[:port_number] )
:SHUTDOWN(deadline)
:SHUTDOWN([host_name[:port_number], deadline)
Usage notes:
All arguments are optional for SHUTDOWN
.
Argument | Type | Default | Description |
---|---|---|---|
host_name
|
STRING
|
The current impalad host to whom the
SHUTDOWN statement is submitted. |
Address of the |
port_number
|
INT
|
|
Specifies the port by which the impalad can be
contacted.
|
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:
impalad
that it is connected to via :SHUTDOWN()
.
impalad
via
:SHUTDOWN('hostname')
.
--shutdown_deadline_s
flag, which defaults to 1 hour.
Security considerations:
The ALL
privilege is required on the server.
Cancellation: Cannot be cancelled.
Examples:
: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: Impala 3.1