[ https://issues.apache.org/jira/browse/HADOOP-12909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15204880#comment-15204880 ]
Tsz Wo Nicholas Sze commented on HADOOP-12909: ---------------------------------------------- bq. ... I know it's not easy with some calls potentially being sync and some being async, but I'd propose having separate instances here. ... Are you saying that it needs two connections for supporting sync and async calls? It seems undesirable to have two connections. A single client should support both sync and async calls. bq. ... Existing sync FS, through FileSystem.getFileSystem; the async one through FileSystem.getAsyncFilesystem() where the latter is (a) refcounted and (b) fully asyc I do agree with the point above but let's raise the FileSystem API discussion in HADOOP-12910 and focus on RPC API here. bq. I do think it's ugly, and worry that it's dangerously easy to share a client across two threads, with consequences. The current implementation with ThreadLocal is thread safe, i.e. it is safe to share a client with two threads. > Change ipc.Client to support asynchronous calls > ----------------------------------------------- > > Key: HADOOP-12909 > URL: https://issues.apache.org/jira/browse/HADOOP-12909 > Project: Hadoop Common > Issue Type: New Feature > Components: ipc > Reporter: Tsz Wo Nicholas Sze > Assignee: Xiaobing Zhou > Attachments: HADOOP-12909-HDFS-9924.000.patch, > HADOOP-12909-HDFS-9924.001.patch, HADOOP-12909-HDFS-9924.002.patch, > HADOOP-12909-HDFS-9924.003.patch > > > In ipc.Client, the underlying mechanism is already supporting asynchronous > calls -- the calls shares a connection, the call requests are sent using a > thread pool and the responses can be out of order. Indeed, synchronous call > is implemented by invoking wait() in the caller thread in order to wait for > the server response. > In this JIRA, we change ipc.Client to support asynchronous mode. In > asynchronous mode, it return once the request has been sent out but not wait > for the response from the server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)