hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dhruba borthakur (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-3400) Facilitate creation of temporary files in HDFS
Date Sun, 18 May 2008 07:56:55 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-3400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

dhruba borthakur updated HADOOP-3400:
-------------------------------------

    Attachment: deleteOnExit.patch

Incorporated Nicholas's comments. For now, I purposely kept the name deleteOnExit while making
the javadoc explicitly state that the file will be deleted when either the JVM exits or the
FileSystem is closed. I did this to maintain some sort of uniformity with the java File.deleteOnExit()
API. But, if more people feel strongly about renaming this API as deleteOnClose, i will be
happy do do that change.

I also kept the default behaviour to be recursive. 

I enhanced the unit test to test for cases when deleteOnExit is called before/after the file
is closed. Also tests the case when the filesystem is closed without closing the file. Also,
test on LocalFileSystem as well as HDFS.

> Facilitate creation of temporary files in HDFS
> ----------------------------------------------
>
>                 Key: HADOOP-3400
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3400
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: dhruba borthakur
>            Assignee: dhruba borthakur
>         Attachments: deleteOnExit.patch, deleteOnExit.patch
>
>
> There are a set of applications that use HDFS to create temporary files. The application
would ideally like these files to be automatically deleted when the application process exits.
This is similar to the File.deleteOnExit() in the Java API.
> One proposal is to add a new method in FileSystem
> public void deleteOnExit(Path)
>     This API requests that the file or directory denoted by this abstract pathname be
deleted when the virtual machine terminates. Deletion will be attempted only for normal termination
of the virtual machine, as defined by the Java Language Specification. Once deletion has been
requested, it is not possible to cancel the request. This method should therefore be used
with care.
> This method can be implemented entirely in the client side code, e.g. FileSystem.java
will keep a cache of all the pathnames specified by the above API. FileSystem.close will invoke
delete() on all the pathnames found in the cache. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message