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 "Suresh Srinivas (JIRA)" <ji...@apache.org> on 2013/07/03 22:41:20 UTC

[jira] [Commented] (HADOOP-9691) RPC clients can generate call ID using AtomicInteger instead of synchronizing on the Client instance.

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

Suresh Srinivas commented on HADOOP-9691:
-----------------------------------------

Patch looks good. One minor comment. Instead of returning null Integer, we could return -1, given callId always starts with 0. You could also say a negative callId means invalid number in the javadoc. Otherwise looks good.
                
> RPC clients can generate call ID using AtomicInteger instead of synchronizing on the Client instance.
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-9691
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9691
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ipc
>    Affects Versions: 3.0.0, 2.1.0-beta
>            Reporter: Chris Nauroth
>            Assignee: Chris Nauroth
>            Priority: Minor
>         Attachments: HADOOP-9691.1.patch
>
>
> As noted in discussion on HADOOP-9688, we can optimize generation of call ID in the RPC client code.  Currently, it synchronizes on the {{Client}} instance to coordinate access to a shared {{int}}.  We can switch this to {{AtomicInteger}} to avoid lock contention.

--
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