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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to