[
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
{code}
/**
* 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);
}
{code}
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
(v6.3.4#6332)