You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/03/10 23:22:42 UTC

[jira] [Commented] (HBASE-10717) TestFSHDFSUtils#testIsSameHdfs fails with IllegalArgumentException running against hadoop 2.3

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

Ted Yu commented on HBASE-10717:
--------------------------------

This seems to be caused by regression in hadoop 2.3
{code}
    String serviceName = fs.getCanonicalServiceName();
{code}
serviceName returned from above call contains port number: 'x.x.x.x:yyy' but fs.getUri() doesn't return port.

Attached patch solves the inconsistency.
TestFSHDFSUtils passes based on hadoop 2.3

> TestFSHDFSUtils#testIsSameHdfs fails with IllegalArgumentException running against hadoop 2.3
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-10717
>                 URL: https://issues.apache.org/jira/browse/HBASE-10717
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>             Fix For: 0.99.0
>
>         Attachments: 10717-v1.txt
>
>
> {code}
> testIsSameHdfs(org.apache.hadoop.hbase.util.TestFSHDFSUtils)  Time elapsed: 0.001 sec  <<< ERROR!
> java.lang.IllegalArgumentException: port out of range:-1
>         at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
>         at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
>         at org.apache.hadoop.hbase.util.FSHDFSUtils.getNNAddresses(FSHDFSUtils.java:88)
>         at org.apache.hadoop.hbase.util.FSHDFSUtils.isSameHdfs(FSHDFSUtils.java:118)
>         at org.apache.hadoop.hbase.util.TestFSHDFSUtils.testIsSameHdfs(TestFSHDFSUtils.java:118)
> {code}
> It came from the following line:
> {code}
>       InetSocketAddress addr = new InetSocketAddress(uri.getHost(), uri.getPort());
> {code}
> where uri is hdfs://127.0.0.1



--
This message was sent by Atlassian JIRA
(v6.2#6252)