[
https://issues.apache.org/jira/browse/HADOOP-14151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901038#comment-15901038
]
Steve Loughran commented on HADOOP-14151:
-----------------------------------------
# it's a duplicate of an existing issue; I think you will be able to find it
# it's essentially how directories are mocked in it, in a way which cyberduck &
c can handle
# You could try to see if using a "/" can be used instead
One thing which can be done is make sure that swift kills parent mock
directories after file and directory create; S3A optimisations show how to do
this best: don't waste time doing HEAD requests, just DELETE each one (though
as s3 supports a bulk delete, it's more efficient here)
> Swift treats 0-len file as directory
> ------------------------------------
>
> Key: HADOOP-14151
> URL: https://issues.apache.org/jira/browse/HADOOP-14151
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs/swift
> Affects Versions: 3.0.0-alpha3
> Reporter: John Zhuge
>
> Unit test {{TestSwiftContractRootDir#testRmNonEmptyRootDirNonRecursive}}
> fails at {{assertIsFile(file)}}. This leads me to suspect swift treats 0-len
> file as directory. Confirmed by the following experiment:
> {noformat}
> $ ls -l /tmp/zero /tmp/abc
> -rw-rw-r-- 1 jzhuge wheel 4 Mar 7 13:19 /tmp/abc
> -rw-rw-r-- 1 jzhuge wheel 0 Mar 7 13:19 /tmp/zero
> $ bin/hadoop fs -put /tmp/zero /tmp/abc swift://jzswift.rackspace/
> 2017-03-07 13:24:09,321 INFO snative.SwiftNativeFileSystemStore: mv
> jzswift/zero._COPYING_ swift://jzswift.rackspace/zero
> $ bin/hadoop fs -touchz swift://jzswift.rackspace/touchz
> $ bin/hadoop fs -ls swift://jzswift.rackspace/
> Found 3 items
> -rw-rw-rw- 1 4 2017-03-07 13:36 swift://jzswift.rackspace/abc
> drwxrwxrwx - 0 2017-03-07 13:28 swift://jzswift.rackspace/touchz
> drwxrwxrwx - 0 2017-03-07 13:32 swift://jzswift.rackspace/zero
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]