You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Carl Steinbach (Created) (JIRA)" <ji...@apache.org> on 2012/02/10 03:29:59 UTC
[jira] [Created] (HADOOP-8053) "har://hdfs-/foo" is not a valid URI
"har://hdfs-/foo" is not a valid URI
------------------------------------
Key: HADOOP-8053
URL: https://issues.apache.org/jira/browse/HADOOP-8053
Project: Hadoop Common
Issue Type: Bug
Components: fs
Affects Versions: 0.23.0, 0.21.0
Reporter: Carl Steinbach
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8053) "har://hdfs-/foo" is not a valid
URI
Posted by "Carl Steinbach (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205179#comment-13205179 ]
Carl Steinbach commented on HADOOP-8053:
----------------------------------------
HADOOP-6560 added a check which requires HAR URIs to include a '-' after the underlying scheme even if a host is not specified. Unfortunately this appears to violate the grammar for the host field defined in RFC-2396. Here are the relevant bits from section 3.2.2:
{noformat}
hostport = host [ ":" port ]
host = hostname | IPv4address
hostname = *( domainlabel "." ) toplabel [ "." ]
toplabel = alpha | alpha *( alphanum | "-" ) alphanum
{noformat}
Note that the toplabel field can't end in a "-", which implies the host field can't end a in a "-".
{noformat}
public class HarURITest {
public static void main(String [] args) {
try {
new URI("har", "hdfs-", "/foo", null);
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
}
{noformat}
Generates:
{noformat}
java.net.URISyntaxException: Illegal character in hostname at index 10: har://hdfs-/foo
at java.net.URI$Parser.fail(URI.java:2809)
at java.net.URI$Parser.parseHostname(URI.java:3337)
at java.net.URI$Parser.parseServer(URI.java:3197)
at java.net.URI$Parser.parseAuthority(URI.java:3116)
at java.net.URI$Parser.parseHierarchical(URI.java:3058)
at java.net.URI$Parser.parse(URI.java:3014)
at java.net.URI.<init>(URI.java:663)
at java.net.URI.<init>(URI.java:764)
at HarURITest.main(HarURITest.java:9)
{noformat}
> "har://hdfs-/foo" is not a valid URI
> ------------------------------------
>
> Key: HADOOP-8053
> URL: https://issues.apache.org/jira/browse/HADOOP-8053
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.21.0, 0.23.0
> Reporter: Carl Steinbach
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HADOOP-8053) "har://hdfs-/foo" is not a valid
URI
Posted by "Tsz Wo (Nicholas), SZE (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205185#comment-13205185 ]
Tsz Wo (Nicholas), SZE commented on HADOOP-8053:
------------------------------------------------
Hi Carl,
"har://hdfs-/foo" actually is also an invalid Hadoop FileSystem path. The har path format is "har://<scheme>-<host>/<path>" and <host> cannot be an empty string.
In HADOOP-6560, I changed it from throwing NullPointerException to IOException. I think it is fine if getting URISyntaxException.
> "har://hdfs-/foo" is not a valid URI
> ------------------------------------
>
> Key: HADOOP-8053
> URL: https://issues.apache.org/jira/browse/HADOOP-8053
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.21.0, 0.23.0
> Reporter: Carl Steinbach
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (HADOOP-8053) "har://hdfs-/foo" is not a valid
URI
Posted by "Tsz Wo (Nicholas), SZE (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-8053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz Wo (Nicholas), SZE resolved HADOOP-8053.
--------------------------------------------
Resolution: Not A Problem
I believe this is not a problem. Please feel free to reopen if not.
> "har://hdfs-/foo" is not a valid URI
> ------------------------------------
>
> Key: HADOOP-8053
> URL: https://issues.apache.org/jira/browse/HADOOP-8053
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 0.21.0, 0.23.0
> Reporter: Carl Steinbach
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira