You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Lars George (JIRA)" <ji...@apache.org> on 2009/12/10 21:59:18 UTC

[jira] Commented: (HBASE-2031) When starting HQuorumPeer, try to match on more than 1 address

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

Lars George commented on HBASE-2031:
------------------------------------

Small thing, you could add arbitrary generics to avoid the warning about the non-generic Enumerations.

Like so:
{code}
    Enumeration<?> nics = NetworkInterface.getNetworkInterfaces();
    while(nics.hasMoreElements()) {
      Enumeration<?> rawAdrs =
          ((NetworkInterface)nics.nextElement()).getInetAddresses();
{code}

Also not sure what the comment means, as it adds all host names and IP addresses it can find for all interfaces the machine has:

{code}
      ...
      while(rawAdrs.hasMoreElements()) {
        // We keep local addresses
        InetAddress inet = (InetAddress) rawAdrs.nextElement();
        ...
{code}

+1 on patch.

Patch simply gets all names as opposed to DNS class that only gets one but both use the same underlaying resolver so the new code should find a match where the user has a different host name in the ZK quorum for the same machine.



> When starting HQuorumPeer, try to match on more than 1 address
> --------------------------------------------------------------
>
>                 Key: HBASE-2031
>                 URL: https://issues.apache.org/jira/browse/HBASE-2031
>             Project: Hadoop HBase
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Jean-Daniel Cryans
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.20.3, 0.21.0
>
>         Attachments: HBASE-2031.patch
>
>
> Many new users hit the issue that the default hostname returned by DNS.getDefaultHost is not the one they configured in hbase.zookeeper.quorum and it gets confusing to debug. Instead, we should just try to match to any non-local address we can find.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.