hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiaobing Zhou (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HADOOP-13511) Simplify logic of RPC connection cache
Date Wed, 17 Aug 2016 23:03:20 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-13511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Xiaobing Zhou updated HADOOP-13511:
-----------------------------------
    Summary: Simplify logic of RPC connection cache  (was: Simplify connection cache logic)

> Simplify logic of RPC connection cache
> --------------------------------------
>
>                 Key: HADOOP-13511
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13511
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>
> In Client#getConnection, the logic of RPC connection cache can be simplified using ConcurrentMap#ConcurrentHashMap.
> {code}
> connection = connections.get(remoteId);
>       if (connection == null) {
>         connection = new Connection(remoteId, serviceClass);
>         Connection existing = connections.putIfAbsent(remoteId, connection);
>         if (existing != null) {
>           connection = existing;
>         }
>       }
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message