Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 91114 invoked from network); 20 May 2009 12:56:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 May 2009 12:56:18 -0000 Received: (qmail 99706 invoked by uid 500); 20 May 2009 12:56:30 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 99640 invoked by uid 500); 20 May 2009 12:56:30 -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 99156 invoked by uid 99); 20 May 2009 12:56:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 12:56:09 +0000 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; Wed, 20 May 2009 12:56:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B3345234C045 for ; Wed, 20 May 2009 05:55:45 -0700 (PDT) Message-ID: <342917317.1242824145733.JavaMail.jira@brutus> Date: Wed, 20 May 2009 05:55:45 -0700 (PDT) From: "Tom White (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-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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=12711130#action_12711130 ] Tom White commented on HADOOP-4829: ----------------------------------- Todd. This patch no longer applies following the changes to the test source tree. Could you please generate a new version? > 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 > Attachments: hadoop-4829-v2.txt, hadoop-4829.txt > > > 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.