[ https://issues.apache.org/jira/browse/HADOOP-12950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218999#comment-15218999 ]
Jing Zhao commented on HADOOP-12950: ------------------------------------ Thanks for updating the patch, Xiaoyu! The 03 patch looks good to me. Just some nits: # How about simplifying the following code to {{HadoopExecutors.newSingleThreadExecutor(new ThreadFactoryBuilder().setDaemon(true).build())}}? {code} 55 HadoopExecutors.newSingleThreadExecutor(new ThreadFactory() { 56 @Override 57 public Thread newThread(Runnable r) { 58 Thread t = new Thread(r); 59 t.setDaemon(true); 60 return t; 61 } 62 }); {code} # HookEntry's constructor/getter methods do not need to be public # {{ShutdownHookManager#hooks}} can be declared as final. # In TestShutdownHookManager, need to clean the spaces and new lines for the following code: {code} LOG.info("Shutdown hook3 interrupted exception:" ,ExceptionUtils .getStackTrace (ex)); {code} +1 after addressing the comments. > ShutdownHookManager should have a timeout for each of the Registered shutdown > hook > ---------------------------------------------------------------------------------- > > Key: HADOOP-12950 > URL: https://issues.apache.org/jira/browse/HADOOP-12950 > Project: Hadoop Common > Issue Type: Improvement > Reporter: Xiaoyu Yao > Assignee: Xiaoyu Yao > Attachments: HADOOP-12950.00.patch, HADOOP-12950.01.patch, > HADOOP-12950.02.patch, HADOOP-12950.03.patch > > > HADOOP-8325 added a ShutdownHookManager to be used by different components > instead of the JVM shutdownhook. For each of the shutdown hook registered, we > currently don't have an upper bound for its execution time. We have seen > namenode failed to shutdown completely (waiting for shutdown hook to finish > after failover) for a long period of time, which breaks the namenode high > availability scenarios. This ticket is opened to allow specifying a timeout > value for the registered shutdown hook. -- This message was sent by Atlassian JIRA (v6.3.4#6332)