You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/08/23 03:26:29 UTC

[GitHub] [hive] nrg4878 commented on a diff in pull request #3530: Hive 22193: Graceful shutdown HiveServer2(addendum)

nrg4878 commented on code in PR #3530:
URL: https://github.com/apache/hive/pull/3530#discussion_r952115704


##########
service/src/java/org/apache/hive/service/server/HiveServer2.java:
##########
@@ -439,7 +439,10 @@ public synchronized void init(HiveConf hiveConf) {
     }
 
     // Add a shutdown hook for catching SIGTERM & SIGINT
-    ShutdownHookManager.addShutdownHook(() -> graceful_stop());
+    long timeout = HiveConf.getTimeVar(getHiveConf(),
+        HiveConf.ConfVars.HIVE_SERVER2_GRACEFUL_STOP_TIMEOUT, TimeUnit.SECONDS);
+    // Add extra time for releasing the resources
+    ShutdownHookManager.addGracefulShutDownHook(() -> graceful_stop(), timeout + 30);

Review Comment:
   what is this extra 30 seconds for? The default is 1800s. What would an extra 30 seconds do anything different. Seems like a small percentage of the default.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org