Github user revans2 commented on a diff in the pull request: https://github.com/apache/storm/pull/2504#discussion_r160240315 --- Diff: storm-client/src/jvm/org/apache/storm/utils/Utils.java --- @@ -291,12 +291,22 @@ public static long bitXor(Long a, Long b) { * runtime to avoid any zombie process in case cleanup function hangs. */ public static void addShutdownHookWithForceKillIn1Sec (Runnable func) { + addShutdownHookWithDelayedForceKill(func, 1); + } + + /** + * Adds the user supplied function as a shutdown hook for cleanup. + * Also adds a function that sleeps for numSecs and then halts the + * runtime to avoid any zombie process in case cleanup function hangs. + */ + public static void addShutdownHookWithDelayedForceKill (Runnable func, int numSecs) { Runnable sleepKill = new Runnable() { @Override public void run() { try { - Time.sleepSecs(1); - LOG.warn("Forceing Halt..."); + LOG.info("Halting after " + numSecs + " seconds"); --- End diff -- Nit could we use the slf4j logging format like ``` LOG.info("Halting after {} second", numSeconds); ```
---