[
https://issues.apache.org/jira/browse/HADOOP-13230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17183476#comment-17183476
]
Steve Jacobs commented on HADOOP-13230:
---------------------------------------
Oh and as a follow up. The reason for the call in the first place. My
understanding is this:
S3 does not have directories at all. So you cannot have an 'empty directory' in
s3. In order to signify an 'empty directory' in S3 an object is created with a
trailing / character to indicate an empty directory. It's more like a 'file'
than a 'directory', it's just a file that has the '/' character as it's last
character. Once ANY object is added to this 'directory' a list operation via
the S3 api will find that object when searching at that path. Once that state
is reached the 'emptyDir' object is no longer necessary, and deleted.
I do not know if there any implications (with the S3 API) with leaving the
emptyDir object in place though. If there are not, it seems the easiest
solution here would be to just leave the object there until deletion of the
folder. Such that the emptyDir object becomes optional.
> S3A to optionally retain directory markers
> ------------------------------------------
>
> Key: HADOOP-13230
> URL: https://issues.apache.org/jira/browse/HADOOP-13230
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 2.9.0
> Reporter: Aaron Fabbri
> Assignee: Steve Loughran
> Priority: Major
> Fix For: 3.3.1
>
>
> Users of s3a may not realize that, in some cases, it does not interoperate
> well with other s3 tools, such as the AWS CLI. (See HIVE-13778, IMPALA-3558).
> Specifically, if a user:
> - Creates an empty directory with hadoop fs -mkdir s3a://bucket/path
> - Copies data into that directory via another tool, i.e. aws cli.
> - Tries to access the data in that directory with any Hadoop software.
> Then the last step fails because the fake empty directory blob that s3a wrote
> in the first step, causes s3a (listStatus() etc.) to continue to treat that
> directory as empty, even though the second step was supposed to populate the
> directory with data.
> I wanted to document this fact for users. We may mark this as not-fix, "by
> design".. May also be interesting to brainstorm solutions and/or a config
> option to change the behavior if folks care.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]