You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cd...@apache.org on 2008/06/11 05:07:03 UTC

svn commit: r666514 - in /hadoop/core/trunk: CHANGES.txt src/core/org/apache/hadoop/fs/FileSystem.java

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<Path> iter = deleteOnExit.iterator(); iter.hasNext();) {