[ https://issues.apache.org/jira/browse/HIVE-22193?focusedWorklogId=790649&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-790649 ]
ASF GitHub Bot logged work on HIVE-22193: ----------------------------------------- Author: ASF GitHub Bot Created on: 14/Jul/22 01:16 Start Date: 14/Jul/22 01:16 Worklog Time Spent: 10m Work Description: dengzhhu653 commented on code in PR #3386: URL: https://github.com/apache/hive/pull/3386#discussion_r920628083 ########## service/src/java/org/apache/hive/service/cli/operation/OperationManager.java: ########## @@ -94,6 +95,14 @@ public synchronized void start() { @Override public synchronized void stop() { super.stop(); + for (Operation operation : getOperations()) { + try { Review Comment: we actually do not cancel operations at all before the changes, instead we shutdown the backgroud pool running the operations: https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/session/SessionManager.java#L367 this does not guarantee that the HiveServer2 would stop immediately when hs2.stop is finished. In some cases, it would wait for all operations done before exiting, and some operation's local files may not be cleaned. Issue Time Tracking ------------------- Worklog Id: (was: 790649) Time Spent: 4h 10m (was: 4h) > Graceful Shutdown HiveServer2 > ----------------------------- > > Key: HIVE-22193 > URL: https://issues.apache.org/jira/browse/HIVE-22193 > Project: Hive > Issue Type: Improvement > Components: Server Infrastructure > Reporter: chenshiyun > Assignee: Zhihua Deng > Priority: Major > Labels: pull-request-available > Time Spent: 4h 10m > Remaining Estimate: 0h > > We have a lot of HiveSever2 servers deployed on production environment (about > 10 nodes). > However, if we want to change configuration or add patches, we would have to > restart all of them one by one. So all the Hive Sql job running on the server > will be defeated, and there may be some mistakes come up on the jdbc client > occasionally. > In the proposed changes, planning to add Graceful Shutdown HiveSever2 method > to avoid affecting the production environment jobs -- This message was sent by Atlassian Jira (v8.20.10#820010)