You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2013/07/08 12:21:49 UTC

[jira] [Commented] (HADOOP-9651) Filesystems to throw FileAlreadyExistsException in createFile(path, overwrite=false) when the file exists

    [ https://issues.apache.org/jira/browse/HADOOP-9651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701916#comment-13701916 ] 

Steve Loughran commented on HADOOP-9651:
----------------------------------------

Core patch looks good, though you need to make sure that your IDE isn't turning imports into .* imports -having them leave all imports alone is the best way to avoid gratuitous diff/merge problems.


I'll add common contract tests for this then merge in the exception modifications
                
> Filesystems to throw FileAlreadyExistsException in createFile(path, overwrite=false) when the file exists
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9651
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9651
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs
>    Affects Versions: 2.1.0-beta
>            Reporter: Steve Loughran
>            Priority: Minor
>         Attachments: HADOOP-9651.patch
>
>
> While HDFS and other filesystems throw a {{FileAlreadyExistsException}} if you try to create a file that exists and you have set {{overwrite=false}}, {{RawLocalFileSystem}} throws a plain {{IOException}}. This makes it impossible to distinguish a create operation failing from a fixable problem (the file is there) and something more fundamental.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira