From core-commits-return-4993-apmail-hadoop-core-commits-archive=hadoop.apache.org@hadoop.apache.org Wed Jun 11 03:07:24 2008 Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 31509 invoked from network); 11 Jun 2008 03:07:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 03:07:24 -0000 Received: (qmail 74407 invoked by uid 500); 11 Jun 2008 03:07:26 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 74375 invoked by uid 500); 11 Jun 2008 03:07:26 -0000 Mailing-List: contact core-commits-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-commits@hadoop.apache.org Received: (qmail 74366 invoked by uid 99); 11 Jun 2008 03:07:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 20:07:26 -0700 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 03:06:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 730B123889F7; Tue, 10 Jun 2008 20:07:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r666514 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/fs/FileSystem.java Date: Wed, 11 Jun 2008 03:07:03 -0000 To: core-commits@hadoop.apache.org From: cdouglas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080611030703.730B123889F7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cdouglas Date: Tue Jun 10 20:07:02 2008 New Revision: 666514 URL: http://svn.apache.org/viewvc?rev=666514&view=rev Log: HADOOP-3467. Improve documentation for FileSystem::deleteOnExit. Contributed by Tsz Wo (Nicholas), SZE. Modified: hadoop/core/trunk/CHANGES.txt hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java Modified: hadoop/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=666514&r1=666513&r2=666514&view=diff ============================================================================== --- hadoop/core/trunk/CHANGES.txt (original) +++ hadoop/core/trunk/CHANGES.txt Tue Jun 10 20:07:02 2008 @@ -287,6 +287,9 @@ HADOOP-3492. Add forrest documentation for user archives. (Mahadev Konar via hairong) + HADOOP-3467. Improve documentation for FileSystem::deleteOnExit. + (Tsz Wo (Nicholas), SZE via cdouglas) + OPTIMIZATIONS HADOOP-3274. The default constructor of BytesWritable creates empty Modified: hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java?rev=666514&r1=666513&r2=666514&view=diff ============================================================================== --- hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java (original) +++ hadoop/core/trunk/src/core/org/apache/hadoop/fs/FileSystem.java Tue Jun 10 20:07:02 2008 @@ -613,9 +613,15 @@ */ public abstract boolean delete(Path f, boolean recursive) throws IOException; - /** Mark a path to be deleted when FileSystem is closed or JVM exits. - * The path has to exist in the file system. + /** + * Mark a path to be deleted when FileSystem is closed. + * When the JVM shuts down, + * all FileSystem objects will be closed automatically. + * Then, + * the marked path will be deleted as a result of closing the FileSystem. * + * The path has to exist in the file system. + * * @param f the path to delete. * @return true if deleteOnExit is successful, otherwise false. * @throws IOException @@ -630,9 +636,10 @@ return true; } - // Delete all files that were marked as delete-on-exit. This recursively - // deletes all files in the specified paths. - // + /** + * Delete all files that were marked as delete-on-exit. This recursively + * deletes all files in the specified paths. + */ protected void processDeleteOnExit() { synchronized (deleteOnExit) { for (Iterator iter = deleteOnExit.iterator(); iter.hasNext();) {