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

Andrew Wang commented on HDFS-5888:
-----------------------------------

I poked around to debug the failing test. It turns out we have some FC only 
code in TestGlobPaths#TestGlobFillsInScheme:

{code}
      if (fc != null) {
        // If we're using FileContext, then we can list a file:/// URI.
        // Since everyone should have the root directory, we list that.
        statuses = wrap.globStatus(new Path("file:///"),
            new AcceptAllPathFilter());
        Assert.assertEquals(1, statuses.length);
        Path filePath = statuses[0].getPath();
        Assert.assertEquals("file", filePath.toUri().getScheme());
        Assert.assertEquals("/", filePath.toUri().getPath());
      }
{code}

The tricky part here is that the default filesystem for this FileContext is an 
HDFS, which is why Jenkins is picking up "localhost:port" for the authority in 
Globber#authorityFromPath:

{code}
        authority = fc.getDefaultFileSystem().getUri().getAuthority();
{code}

If I change it to this, the test passes:

{code}
        authority = fc.getFSofPath(path).getUri().getAuthority();
{code}

I think the error stems from how file:// URIs have a null authority, and we 
shouldn't fill it in. I think the fix is to use getFSofPath for both FC and FS 
in authorityFromPath.

> Cannot get the FileStatus of the root inode from the new Globber
> ----------------------------------------------------------------
>
>                 Key: HDFS-5888
>                 URL: https://issues.apache.org/jira/browse/HDFS-5888
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>            Reporter: Andrew Wang
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-5888.002.patch
>
>
> We can no longer get the correct FileStatus of the root inode "/" from the 
> Globber.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to