hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pankaj Kumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12781) thrift2 listen port will bind always to the passed command line address
Date Wed, 31 Dec 2014 04:25:13 GMT

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

Pankaj Kumar commented on HBASE-12781:
--------------------------------------

Thanks [~yuzhihong@gmail.com] for the review. :)

> thrift2 listen port will bind always to the passed command line address
> -----------------------------------------------------------------------
>
>                 Key: HBASE-12781
>                 URL: https://issues.apache.org/jira/browse/HBASE-12781
>             Project: HBase
>          Issue Type: Bug
>          Components: Thrift
>    Affects Versions: 0.98.3
>            Reporter: Pankaj Kumar
>            Assignee: Pankaj Kumar
>             Fix For: 2.0.0, 0.98.10, 1.1.0
>
>         Attachments: 12781-V1.patch
>
>
> In Thrift server,  listen port will bind always to the address which  is passed through
command line argument. 
> {code}
> InetSocketAddress inetSocketAddress = bindToPort(cmd.getOptionValue("bind"), listenPort);
> {code}
> {code}
> private static InetSocketAddress bindToPort(String bindValue, int listenPort)
>       throws UnknownHostException {
>     try {
>       if (bindValue == null) {
>         return new InetSocketAddress(listenPort);
>       } else {
>         return new InetSocketAddress(InetAddress.getByName(bindValue), listenPort);
>       }
>     } catch (UnknownHostException e) {
>       throw new RuntimeException("Could not bind to provided ip address", e);
>     }
>   }
> {code}
> In case when bind address is not passed through argument then it is binding with any
local  address. It should read hbase.thrift.info.bindAddress  value from configuration first.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message