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

Steve Loughran commented on HADOOP-15140:
-----------------------------------------

bq.  Or is it the case that we want to treat "s3a://bucket" like 
"s3a://bucket/" and not throw an exception?

exactly. As that's what you get without s3guard.

I can't call getFileStatus on the root path without a stack trace. And this 
surfaces in code which has a path p like {{s3a://bucket/file.txt}} and you can 
getFileStatus(p.getParent()). The key of that parent is being mapped to "/" and 
then s3guard is failing.

I'd recommend you start with tests (actually, this could go into one of the 
hadoop-common contract tests as it is universal to all

{code}

getFileStatus(new Path("/"));
getFileStatus(new Path("/dir").getParent());
{code}


And see what happens. I expect the same outcome on s3guard as you get without 
it.


> S3guard mistakes root URI without / as non-absolute path
> --------------------------------------------------------
>
>                 Key: HADOOP-15140
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15140
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/s3
>    Affects Versions: 3.0.0
>            Reporter: Steve Loughran
>            Assignee: Abraham Fine
>
> If you call {{getFileStatus("s3a://bucket")}} then S3Guard will throw an 
> exception in putMetadata, as it mistakes the empty path for "non-absolute 
> path"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to