Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 59859 invoked from network); 13 Feb 2009 05:42:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Feb 2009 05:42:29 -0000 Received: (qmail 7961 invoked by uid 500); 13 Feb 2009 05:42:22 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 7909 invoked by uid 500); 13 Feb 2009 05:42:22 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 7890 invoked by uid 99); 13 Feb 2009 05:42:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2009 21:42:22 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2009 05:42:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ACB21234C4A7 for ; Thu, 12 Feb 2009 21:41:59 -0800 (PST) Message-ID: <1265010333.1234503719706.JavaMail.jira@brutus> Date: Thu, 12 Feb 2009 21:41:59 -0800 (PST) From: "Stefan Will (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Commented: (HADOOP-4829) Allow FileSystem shutdown hook to be disabled In-Reply-To: <1418737470.1228971404269.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-4829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673151#action_12673151 ] Stefan Will commented on HADOOP-4829: ------------------------------------- +1 ;-) > Allow FileSystem shutdown hook to be disabled > --------------------------------------------- > > Key: HADOOP-4829 > URL: https://issues.apache.org/jira/browse/HADOOP-4829 > Project: Hadoop Core > Issue Type: New Feature > Components: fs > Affects Versions: 0.18.1 > Reporter: Bryan Duxbury > Priority: Minor > > FileSystem sets a JVM shutdown hook so that it can clean up the FileSystem cache. This is great behavior when you are writing a client application, but when you're writing a server application, like the Collector or an HBase RegionServer, you need to control the shutdown of the application and HDFS much more closely. If you set your own shutdown hook, there's no guarantee that your hook will run before the HDFS one, preventing you from taking some shutdown actions. > The current workaround I've used is to snag the FileSystem shutdown hook via Java reflection, disable it, and then run it on my own schedule. I'd really appreciate not having to do take this hacky approach. It seems like the right way to go about this is to just to add a method to disable the hook directly on FileSystem. That way, server applications can elect to disable the automatic cleanup and just call FileSystem.closeAll themselves when the time is right. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.