[ 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-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org