hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yu Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16275) Change ServerManager#onlineServers from ConcurrentHashMap to ConcurrentSkipListMap
Date Thu, 28 Jul 2016 12:10:20 GMT

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

Yu Li commented on HBASE-16275:

+1 on v2, checked all failed UT on local with patch and confirmed all passed, also checked
TestServerManagerPerf with 2000 nodes on local (mac pro) and confirmed there's performance
gain (not that much, but probably due to my poor machine...).

> Change ServerManager#onlineServers from ConcurrentHashMap to ConcurrentSkipListMap
> ----------------------------------------------------------------------------------
>                 Key: HBASE-16275
>                 URL: https://issues.apache.org/jira/browse/HBASE-16275
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Minor
>         Attachments: HBASE-16275-v001.patch, HBASE-16275-v002.patch, TestServerManagerPerf.java
> In Class ServerManager, onlineServers is declared as ConcurrentHashMap. In findServerWithSameHostnamePortWithLock(),
it has to do a loop to find if there is a ServerName with same host:port pair. If replaced
with ConcurrentSkipListMap, findServerWithSameHostnamePortWithLock() can be replaced with
a O(logN) implementation. 
> I run some performance comparison(test the function only), it seems that there is no
difference if there are 1000 servers. With more servers, ConcurrentSkipListMap implementation
is going to win big.

This message was sent by Atlassian JIRA

View raw message