hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7919) Wrong key is used in ServerManager#getServerConnection() to retrieve from Map serverConnections
Date Tue, 05 Mar 2013 07:53:58 GMT

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

Hudson commented on HBASE-7919:
-------------------------------

Integrated in HBase-0.94-security-on-Hadoop-23 #12 (See [https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/12/])
    HBASE-7919 Wrong key is used in ServerManager#getServerConnection() to retrieve from Map
serverConnections (Anoop) (Revision 1449372)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java

                
> Wrong key is used in ServerManager#getServerConnection() to retrieve from Map serverConnections
> -----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-7919
>                 URL: https://issues.apache.org/jira/browse/HBASE-7919
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 0.94.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 0.94.6
>
>         Attachments: HBASE-7919_94.patch
>
>
> ServerManager#getServerConnection() try to retrieve the cached connection from Map serverConnections.
ServerName objects are the key with which items are saved in this map. But we use String type
to get. This always returns null and in turn the Master creates a new connection with RS again
and again.
> {code}
> private final Map<ServerName, HRegionInterface> serverConnections =
>     new HashMap<ServerName, HRegionInterface>();
> ...........
> private HRegionInterface getServerConnection(final ServerName sn)
>   throws IOException {
>     HRegionInterface hri = this.serverConnections.get(sn.toString());
>     if (hri == null) {
>       LOG.debug("New connection to " + sn.toString());
>       hri = this.connection.getHRegionConnection(sn.getHostname(), sn.getPort());
>       this.serverConnections.put(sn, hri);
>     }
>     return hri;
>   }
> {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

Mime
View raw message