[
https://issues.apache.org/jira/browse/YARN-4615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15120689#comment-15120689
]
Rohith Sharma K S commented on YARN-4615:
-----------------------------------------
Analysis make sense to me, I am able to reproduce the issue keeping very small
delay like below
{code}
node.nodeHeartbeat(applicationAttemptOneID, 1, ContainerState.COMPLETE);
Thread.sleep(200);
rm.waitForState(node, am1ContainerID, RMContainerState.COMPLETED);
{code}
About the patch, would you use existing method
{{MockRM#waitForContainerState(ContainerId containerId,RMContainerState
state)}} and modify a little bit for incorporating your new method logic.
For testing purpose, you can use small delay like in the above.
> TestAbstractYarnScheduler#testResourceRequestRecoveryToTheRightAppAttempt
> fails occasionally
> --------------------------------------------------------------------------------------------
>
> Key: YARN-4615
> URL: https://issues.apache.org/jira/browse/YARN-4615
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: test
> Reporter: Jason Lowe
> Assignee: Sunil G
> Attachments: 0001-YARN-4615.patch
>
>
> Sometimes
> TestAbstractYarnScheduler#testResourceRequestRecoveryToTheRightAppAttempt
> will fail like this:
> {noformat}
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.TestAbstractYarnScheduler
> testResourceRequestRecoveryToTheRightAppAttempt[1](org.apache.hadoop.yarn.server.resourcemanager.scheduler.TestAbstractYarnScheduler)
> Time elapsed: 77.427 sec <<< FAILURE!
> java.lang.AssertionError: Attempt state is not correct (timedout): expected:
> SCHEDULED actual: ALLOCATED for the application attempt
> appattempt_1453254869107_0001_000002
> at org.junit.Assert.fail(Assert.java:88)
> at
> org.apache.hadoop.yarn.server.resourcemanager.MockRM.waitForState(MockRM.java:197)
> at
> org.apache.hadoop.yarn.server.resourcemanager.MockRM.waitForState(MockRM.java:172)
> at
> org.apache.hadoop.yarn.server.resourcemanager.MockRM.waitForAttemptScheduled(MockRM.java:831)
> at
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.TestAbstractYarnScheduler.testResourceRequestRecoveryToTheRightAppAttempt(TestAbstractYarnScheduler.java:572)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)