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

sandflee commented on YARN-5375:
--------------------------------

update the patch to invoke drainEventsImplicitly() at the front of 
waitForState().  and fix a test failure caused by this
{code:title=TestAbstractYarnScheduler.java}
     // AM crashes, and a new app-attempt gets created
      node.nodeHeartbeat(applicationAttemptOneID, 1, ContainerState.COMPLETE);
      rm.waitForState(node, am1ContainerID, RMContainerState.COMPLETED, 30 * 
1000);
      RMAppAttempt rmAppAttempt2 = MockRM.waitForAttemptScheduled(rmApp, rm);
{code}
waitForState will drain all events first leading  completed container not exist 
in new schedulerAppAttempt, and the coresponding waitForState() code will 
invoke node hearbeat, appattempt will be allocated state, the check for 
scheduled state will fail


> invoke MockRM#drainEvents implicitly in MockRM methods to reduce test failures
> ------------------------------------------------------------------------------
>
>                 Key: YARN-5375
>                 URL: https://issues.apache.org/jira/browse/YARN-5375
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: resourcemanager
>            Reporter: sandflee
>            Assignee: sandflee
>              Labels: oct16-medium
>         Attachments: YARN-5375.01.patch, YARN-5375.03.patch, 
> YARN-5375.04.patch, YARN-5375.05.patch, YARN-5375.06.patch, 
> YARN-5375.07-drain-statestore.patch, YARN-5375.07-sync-statestore.patch, 
> YARN-5375.08.patch, YARN-5375.09.patch, YARN-5375.10.patch, YARN-5375.11.patch
>
>
> seen many test failures related to RMApp/RMAppattempt comes to some state but 
> some event are not processed in rm event queue or scheduler event queue, 
> cause test failure, seems we could implicitly invokes drainEvents(should also 
> drain sheduler event) in some mockRM method like waitForState



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to