[
https://issues.apache.org/jira/browse/HADOOP-8545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542184#comment-13542184
]
Steve Loughran commented on HADOOP-8545:
----------------------------------------
I'm looking at this. One thing I don't understand is the logic in
{{SwiftNativeFileSystem.create()}}, after getting the file status:
{code}
if (fileStatus != null && !fileStatus.isDir()) {
if (overwrite) {
delete(file, true);
} else {
throw new IOException("File already exists: " + file);
}
} else {
Path parent = file.getParent();
if (parent != null) {
if (!mkdirs(parent)) {
throw new IOException("Mkdirs failed to create " + parent.toString());
}
}
}
{code}
I can see that the "don't overwrite an existing file unless
{{overwrite==true}}" is there, but what does it mean if the path exists and is
a directory? That it's just a no-op?
If so I'd like to change the logic to make it more explicit what is going on.
> Filesystem Implementation for OpenStack Swift
> ---------------------------------------------
>
> Key: HADOOP-8545
> URL: https://issues.apache.org/jira/browse/HADOOP-8545
> Project: Hadoop Common
> Issue Type: New Feature
> Components: fs
> Affects Versions: 2.0.3-alpha, 1.1.2
> Reporter: Tim Miller
> Priority: Minor
> Attachments: HADOOP-8545-1.patch, HADOOP-8545-2.patch,
> HADOOP-8545-3.patch, HADOOP-8545-4.patch, HADOOP-8545-javaclouds-2.patch,
> HADOOP-8545.patch, HADOOP-8545.patch
>
>
> Add a filesystem implementation for OpenStack Swift object store, similar to
> the one which exists today for S3.
--
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