Configuring graceful shutdown property for HiveServer
Learn how to configure the graceful shutdown timeout property for HiveServer (HS2), which ensures that HS2 waits for a specified time period before shutting down, thereby allowing queries that are already running to complete before HS2 stops.
You must also know that submitting new queries or starting a new session during a HS2 graceful shutdown will fail. Also, if there are no active queries during the graceful shutdown, HS2 stops in 30 seconds instead of waiting 5 minutes for all the live sessions to close.
You can modify the graceful shutdown timeout property based on a customer's usage, for example, you can choose to increase the timeout property if the customer has long running queries.
The HS2 graceful shutdown
is initiated during a Cloudera Runtime Rolling Upgrade, Rolling Restart, can be
triggered by stopping HS2 in Cloudera Manager, or by running the
--service hiveserver2 --graceful_stop command.
- In Cloudera Manager, click Clusters and select the Hive on Tez service.
From the Hive on Tez service, go to the Configuration tab
and search for
- Modify the graceful timeout value. By default, the timeout value is set to 5 minutes.
- Click Save Changes and restart the Hive on Tez service.
For example, if the timeout value was changed from 5 minutes to 10 minutes, the first HS2 restart considers the 5 minute timeout for the graceful shutdown. The second HS2 restart will consider the 10 minute timeout value.