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

Vinod Kumar Vavilapalli commented on YARN-2517:
-----------------------------------------------

I am +1 about a client that makes async calls. The question is whether we need 
a a new client class (and thus a public interface) or not.

Clearly, async calls need call-back handlers _just_ for errors. As of today, 
there are no APIs that really need to send back *results* (not error) 
asynchronously. The way you usually handle it is through one of the following
{code}
// Sync call
Result call(Input);
// Async call - Type (1)
void asyncCall(Input, CallBackHandler);
// Async call - Type (2)
Future asyncCall(Input);
{code}
You can do type (1). Having an entire separate client side interface isn't 
mandatory.

If you guys think there is a lot more functionality coming in an async class in 
the future, can we hear about some of them here?

> Implement TimelineClientAsync
> -----------------------------
>
>                 Key: YARN-2517
>                 URL: https://issues.apache.org/jira/browse/YARN-2517
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Zhijie Shen
>            Assignee: Tsuyoshi OZAWA
>         Attachments: YARN-2517.1.patch
>
>
> In some scenarios, we'd like to put timeline entities in another thread no to 
> block the current one.
> It's good to have a TimelineClientAsync like AMRMClientAsync and 
> NMClientAsync. It can buffer entities, put them in a separate thread, and 
> have callback to handle the responses.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to