You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Xiaobing Zhou (JIRA)" <ji...@apache.org> on 2016/08/17 23:03:20 UTC
[jira] [Updated] (HADOOP-13511) Simplify logic of RPC connection
cache
[ 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