Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0091119C6C for ; Wed, 30 Mar 2016 22:41:26 +0000 (UTC) Received: (qmail 22734 invoked by uid 500); 30 Mar 2016 22:41:25 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 22688 invoked by uid 500); 30 Mar 2016 22:41:25 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 22672 invoked by uid 99); 30 Mar 2016 22:41:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2016 22:41:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 895DF2C1F61 for ; Wed, 30 Mar 2016 22:41:25 +0000 (UTC) Date: Wed, 30 Mar 2016 22:41:25 +0000 (UTC) From: "Jing Zhao (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-12950) ShutdownHookManager should have a timeout for each of the Registered shutdown hook MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)