wangyang0918 commented on a change in pull request #15396:
URL: https://github.com/apache/flink/pull/15396#discussion_r605388703



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/SignalHandler.java
##########
@@ -53,6 +63,13 @@ public void handle(Signal signal) {
                     "RECEIVED SIGNAL {}: SIG{}. Shutting down as requested.",
                     signal.getNumber(),
                     signal.getName());
+            try {
+                shutdownSupplier
+                        .get()
+                        .get(SHUTDOWN_TIMEOUT.toMilliseconds(), 
TimeUnit.MILLISECONDS);

Review comment:
       I do not think `SIGKILL` could be handled via `sun.misc.SignalHandler`. 
`SIGKILL` means the force-kill, and the JVM does not have any chance to do the 
signal handler and shutdown hook.
   
   Currently, the `ClusterEntrypoint` will exit when receiving `SIGTERM`, 
`SIGHUP`, `SIGINT`. So the `shutdownSupplier` will be executed in such cases.




-- 
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.

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


Reply via email to