[
https://issues.apache.org/jira/browse/HADOOP-11621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16886545#comment-16886545
]
Al Johri commented on HADOOP-11621:
-----------------------------------
This tripped me up pretty hard today. It would be great to implement the <=1 or
at least a warning message if Content-Length == 1.
For future onlookers, you can change the Content-Length to 0 like so:
*Check Content Length:*
{code:java}
aws s3api get-object --bucket mybucket --key myfolder/ /dev/stdout{code}
*Set Content Length:*
{code:java}
aws s3api put-object --bucket mybucket --key myfolder/ --content-length 0{code}
> s3a doesn't consider blobs with trailing / and content-length >0 as
> directories
> -------------------------------------------------------------------------------
>
> Key: HADOOP-11621
> URL: https://issues.apache.org/jira/browse/HADOOP-11621
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 2.7.0
> Reporter: Denis Jannot
> Priority: Major
>
> 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
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]