You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2013/07/18 00:46:48 UTC

[jira] [Commented] (HBASE-8968) Avoid call to zk in HRegionServer#getMaster() to log the master address which already read from the zk.

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

Lars Hofhansl commented on HBASE-8968:
--------------------------------------

Nice catch. This is not present in trunk.
Will commit to 0.94 in a few minutes.
                
> Avoid call to zk in HRegionServer#getMaster() to log the master address which already read from the zk. 
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-8968
>                 URL: https://issues.apache.org/jira/browse/HBASE-8968
>             Project: HBase
>          Issue Type: Bug
>          Components: Zookeeper
>    Affects Versions: 0.94.9
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>            Priority: Minor
>             Fix For: 0.94.10
>
>         Attachments: HBASE-8968_94.patch
>
>
> To log the master address we are making an extra call to zookeeper which we already read and trying to connect to the address.
> {code}
>       masterServerName = this.masterAddressManager.getMasterAddress();
>       if (masterServerName == null) {
>         if (!keepLooping()) {
>           // give up with no connection.
>           LOG.debug("No master found and cluster is stopped; bailing out");
>           return null;
>         }
>         LOG.debug("No master found; retry");
>         previousLogTime = System.currentTimeMillis();
>         sleeper.sleep();
>         continue;
>       }
>       masterIsa =
>         new InetSocketAddress(masterServerName.getHostname(), masterServerName.getPort());
>       LOG.info("Attempting connect to Master server at " +
>         this.masterAddressManager.getMasterAddress());
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira