hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7086) httpfs create files default overwrite behavior is set to true
Date Thu, 18 Sep 2014 10:15:35 GMT

    [ https://issues.apache.org/jira/browse/HDFS-7086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14138755#comment-14138755

Steve Loughran commented on HDFS-7086:

This behaviour is consistent with HDFS and other implementations of {{FileSystem}}, because
{{create(Path)}} defaults to overwrite
   * Create an FSDataOutputStream at the indicated Path.
   * Files are overwritten by default.
   * @param f the file to create
  public FSDataOutputStream create(Path f) throws IOException {
    return create(f, true);

Looking at the filesystem.md and {{AbstractContractCreateTest}}, I don't see where this is
explicitly called out or tested for. Doing both of these would ensure that when someone got
round to doing contract tests for WebHDFS its consistency with HDFS can be validated.

Tagging as a documentation & test

> httpfs create files default overwrite behavior is set to true
> -------------------------------------------------------------
>                 Key: HDFS-7086
>                 URL: https://issues.apache.org/jira/browse/HDFS-7086
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: documentation, test
>    Affects Versions: 2.0.0-alpha, 2.1.0-beta, 2.2.0, 2.3.0, 2.4.1, 2.5.1
>         Environment: Linux, Java
>            Reporter: Eric Yang
> WebHDFS documentation says overwrite flag is default to false, but httpfs set the flag
to true by default.  This can be different from user's expectation and cause data to be overwritten.

This message was sent by Atlassian JIRA

View raw message