[ https://issues.apache.org/jira/browse/HDFS-7031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Nauroth resolved HDFS-7031. --------------------------------- Resolution: Won't Fix Thanks again, Ryan. I've resolved this as won't fix. I'm also going to ask for a second opinion from another committer who knows {{Path}} pretty well. Let's try [~daryn] or [~arpitagarwal]. If either of you review the comments here and disagree with my decision to resolve as won't fix, then please feel free to reopen. > Path#makeQualified copies authority when scheme does not match > -------------------------------------------------------------- > > Key: HDFS-7031 > URL: https://issues.apache.org/jira/browse/HDFS-7031 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs-client > Affects Versions: 2.3.0 > Reporter: Ryan Blue > > I have an application that calls {{makeQualified}} that amounts to this: > {code:java} > new Path("file:/some/local/path").makeQualified( > URI.create("hdfs://nn:8020"), new Path("/")); > {code} > This unexpectedly produces {{file://nn:8020/some/local/path}}, using the > authority section from the default URI even though the path that is being > qualified doesn't have a scheme that matches the default URI. > In {{Path}}, there is a check to see if the default URI should be used: > {code:java} > if (scheme != null && > (authority != null || defaultUri.getAuthority() == null)) > return path; > {code} > I think this should be: > {code:java} > // if the scheme matches and there is no authority, use the default > if (scheme != null && scheme.equals(defaultUri.getScheme()) && > (authority != null || defaultUri.getAuthority() == null)) > return path; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)