John Zhuge created HADOOP-14151:
-----------------------------------
Summary: 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]