[ 
https://issues.apache.org/jira/browse/HADOOP-11621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14334222#comment-14334222
 ] 

Steve Loughran commented on HADOOP-11621:
-----------------------------------------

If you look at the specification of 
[FileSystem.getFileStatus()|http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/filesystem/filesystem.html],
 we say "the size of directories must be 0". 

That's an implicit concept in Unix-filesystems: the entries point to data or to 
a directory.

It also leads to  follow-on point: *you can't have files under another file*

In object stores, it's not so clear cut, because you can have things in the 
path that have data, and things in paths underneath. That breaks the illusion 
of files and directories that s3a:// creates and relies on. It sees a structure 
that isn't consistent with the illusion, and it isn't happy as it is a warning 
sign of a structure that can potentially have other problems. As far as s3a is 
concerned, the object store isn't consistent with the illusion, and so rejects 
it.

 swift:// will behave the same way.

Is it just S3Browse which is creating objects with "/" with actual content in 
and then expecting them to be a directory? What is it putting in the content? 
And why?






> s3a doesn't work with directories having a content-length = 1
> -------------------------------------------------------------
>
>                 Key: HADOOP-11621
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11621
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs/s3
>    Affects Versions: 2.7.0
>            Reporter: Denis Jannot
>
> When creating a directory using the AWS Management Console, the 
> content-length is set to 0 and s3a works fine.
> When creating a directory using other tools, like S3Browse, the 
> content-length is set to 1 and s3a doesn't work:
> S3AFileSystem: Found file (with /): real file? should not happen: dir1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to