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

Zhijie Shen commented on YARN-1917:
-----------------------------------

+1. It sounds a useful method to me. I can see it is a normal case that a 
client submits a job and sits in a loop until the job gets finished. In 
addition to UnmanagedAMLauncher, I just looked at distributed shell, which 
follows this pattern too.

Just think it out loudly. Do we want a generalized form: 
YarnClient.waitForState(ApplicationId appId, YarnApplicationState state)? We 
already have similar stuff for testing. Not sure whether it is valid 
requirement in production or not. Thoughts?

One of related observation is that AMRMClient(Async) may want to have the 
similar stuff. Now what AM can do is to sit in a loop and check whether all the 
tasks are done, and then do unregistration. It is also good to have method 
waitFor(Supplier<Boolean> check) or waitForUnregistration(). Will file a 
separate ticket to tackle it.

> Add "waitForCompletion" interface to YarnClient
> -----------------------------------------------
>
>                 Key: YARN-1917
>                 URL: https://issues.apache.org/jira/browse/YARN-1917
>             Project: Hadoop YARN
>          Issue Type: New Feature
>          Components: client
>    Affects Versions: 2.4.0
>            Reporter: Wangda Tan
>            Priority: Minor
>
> Currently, YARN dosen't have this method. Users needs to write 
> implementations like UnmanagedAMLauncher.monitorApplication or 
> mapreduce.Job.monitorAndPrintJob on their own. This feature should be helpful 
> to end users.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to