Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 59044 invoked from network); 21 May 2009 15:24:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 May 2009 15:24:56 -0000 Received: (qmail 42285 invoked by uid 500); 21 May 2009 15:25:07 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 42223 invoked by uid 500); 21 May 2009 15:25:07 -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 42213 invoked by uid 99); 21 May 2009 15:25:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2009 15:25:07 +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; Thu, 21 May 2009 15:25:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A705E234C04C for ; Thu, 21 May 2009 08:24:45 -0700 (PDT) Message-ID: <454803659.1242919485683.JavaMail.jira@brutus> Date: Thu, 21 May 2009 08:24:45 -0700 (PDT) From: "Tom White (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (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:all-tabpanel ] Tom White updated HADOOP-4829: ------------------------------ Resolution: Fixed Fix Version/s: 0.21.0 Assignee: Todd Lipcon Hadoop Flags: [Reviewed] Status: Resolved (was: Patch Available) I've just committed this. Thanks Todd! (Could you fill in the release note please.) > 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 > Assignee: Todd Lipcon > Priority: Minor > Fix For: 0.21.0 > > Attachments: HADOOP-4829-0.18.3.patch, hadoop-4829-v2.txt, hadoop-4829-v3.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.