Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 48135 invoked from network); 20 May 2009 21:16:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 May 2009 21:16:56 -0000 Received: (qmail 79603 invoked by uid 500); 20 May 2009 21:17:08 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 79538 invoked by uid 500); 20 May 2009 21:17: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 79528 invoked by uid 99); 20 May 2009 21:17:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2009 21:17: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; Wed, 20 May 2009 21:17:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A87A6234C1EB for ; Wed, 20 May 2009 14:16:45 -0700 (PDT) Message-ID: <1560092110.1242854205689.JavaMail.jira@brutus> Date: Wed, 20 May 2009 14:16:45 -0700 (PDT) From: "Todd Lipcon (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 ] Todd Lipcon updated HADOOP-4829: -------------------------------- Attachment: hadoop-4829-v3.txt Rebased this patch against current trunk (old patch didn't apply because of a test dir rename) > 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-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.