[
https://issues.apache.org/jira/browse/YARN-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13638266#comment-13638266
]
Zhijie Shen commented on YARN-549:
----------------------------------
Thanks @Bikas for the comments.
{quote}
The new thread and sleep waiting 20 times is making the test long. We could
simply have
when(mockReport.getYarnApplicationState()).thenReturn(NEW).thenReturn(NEW_SAVING).thenReturn(NEW_SAVING).thenReturn(SUBMITTED).
Then call client.submitApplication() and then assert that
mockReport.getYarnApplicationState() has been called 4 times. Would that be
insufficient?
{quote}
In addition to see we can finally leave the block when the application enter
SUBMITTED, I'd like also to see we are blocked in submitApplication when the
application is still in NEW and NEW_SAVING.
Moreover, the test speed bounded by the polling interval and maxTries. I can
modify the two params to make the tests faster.
> Asynchronous application submission
> -----------------------------------
>
> Key: YARN-549
> URL: https://issues.apache.org/jira/browse/YARN-549
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Zhijie Shen
> Assignee: Zhijie Shen
> Attachments: Proposal of Asynchronous Application Submission_v1.pdf,
> YARN-549.1.patch, YARN-549.2.patch
>
>
> Currently, when submitting an application, storeApplication will be called
> for recovery. However, it is a blocking API, and is likely to block
> concurrent application submissions. Therefore, it is good to make application
> submission asynchronous, and postpone storeApplication.
--
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