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

Bikas Saha commented on YARN-549:
---------------------------------

This is user facing. Replace with "application has been submitted and accepted 
by the ResourceManager" ?
{code}
+   * application has enter SUBMITTED or the states afterwards.
{code}

The log should probably go to the end after completion right?
{code}
     rmClient.submitApplication(request);
     LOG.info("Submitted application " + applicationId + " to ResourceManager"
         + " at " + rmAddress);
{code}

I dont see why we should throw a YarnRemoteException when sleeping is 
interrupted locally.

I think we should check for another state after SUBMITTED too. This will verify 
that the waiting in the client is not looking for an exact expected state 
(which would be wrong because that state may be missed in between polling).
{code}
+    // app submission returns when YarnApplicationState.SUBMITTED
+    assertThreadAlive(t, maxTries, true);
+    Assert.assertFalse(t.isAlive());
{code}

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?

Append ms to config value to show that its milliseconds?

Minor typos in comment (fixed inline)
{code}
+    // Validations of the application submission context need to be here if
+    // they are independent of the RM's configuration. They only need to be
+    // done once during submission.
{code}
                
> 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

Reply via email to