[
https://issues.apache.org/jira/browse/HDFS-4332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13567174#comment-13567174
]
Steve Loughran commented on HDFS-4332:
--------------------------------------
Looking at the source, on branch-1, line 437 is constructing a new path, which
could throw this exception if {{relativepath==""}}
{code}
for (String commonPrefix : listing.getCommonPrefixes()) {
Path subpath = keyToPath(commonPrefix);
String relativePath = pathUri.relativize(subpath.toUri()).getPath();
status.add(newDirectory(new Path(absolutePath, relativePath)));
//HERE
}
{code}
> NativeS3FileSystem throws exception for root ( / )
> --------------------------------------------------
>
> Key: HDFS-4332
> URL: https://issues.apache.org/jira/browse/HDFS-4332
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: hdfs-client
> Affects Versions: 1.0.4, 1.1.1
> Reporter: Costin Leau
>
> The Native S3 file system cannot list paths from the root.
> NativeS3FileSystem.listStatus("/") throws IllegalArgumentException in both
> Hadoop 1.0.4 and 1.1.1:
> {code}
> java.lang.IllegalArgumentException: Can not create a Path from an empty
> string
> at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82)
> at org.apache.hadoop.fs.Path.<init>(Path.java:90)
> at org.apache.hadoop.fs.Path.<init>(Path.java:50)
> at
> org.apache.hadoop.fs.s3native.NativeS3FileSystem.listStatus(NativeS3FileSy
> stem.java:437)
> {code}
> where the fs.default.name is any of s3n://bucket/, s3n://bucket ,
> s3n://bucket/foder or s3n://bucket/folder/
> I tried all file-system variants (just the bucket, w/ and w/o trailing
> slash, bucket + folder, w/ or w/o trailing slash).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira