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

Wangda Tan commented on YARN-1917:
----------------------------------

Thank Zhijie for this comment!
bq. 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?
+1 for this idea, it should be useful to many applications. I think we can make 
the interface like,
{code}
public void waitForCompletion(ApplicationId appId, boolean verbose, 
Set<YarnApplicationState> finalStates)
{code}
If finalStates is null, we will use \{FINISHED,FAILED,KILLED\} as default value.
If we specified verbose flag, verbose message will be logged, such as some 
application's state changed, we can print such messages to screen.
Any comments?

For AMRMClient, we can fire another JIRA for 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
>
> 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