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

Mike Percy commented on AVRO-1122:
----------------------------------

Hi James, yep now I know it pretty much has to block based on the Transceiver 
API and the way the Proxy is implemented. It's a little tricky, since at the 
moment you can't perform the handshake before the proxy object is instantiated 
AFAICT. Based on my experience with Avro RPC in Flume, I'd like to be able to 
use a client API that provides something along the lines of:

1. set address & port of endpoint (NettyTransceiver does this today)
2. set interface (SpecificRequestor.getClient() does this today)
3. async TCP connection using a CallFuture (not possible today)
   - throws if address/port not set properly
4. async handshake using a CallFuture (not possible today)
   - throws if not connected, or if interface not set properly
   - alternatively, specify a boolean flag to connect if needed
5. async RPC calls (possible using the CallFuture / Callback APIs)
   - throws if handshake not completed or connection is not open

I'm not sure how to weave that into the existing framework yet, though.
                
> Java: Avro RPC Requestor can block during handshake in async mode
> -----------------------------------------------------------------
>
>                 Key: AVRO-1122
>                 URL: https://issues.apache.org/jira/browse/AVRO-1122
>             Project: Avro
>          Issue Type: Bug
>    Affects Versions: 1.6.3
>            Reporter: Mike Percy
>         Attachments: Screen Shot 2012-06-27 at 12.43.32 AM.png
>
>
> We are seeing an issue in Flume where the Avro RPC Requestor is blocking for 
> long periods of time waiting for the Avro handshake to complete. Since we are 
> using the API with Futures, this should not block.

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

Reply via email to