Tsuyoshi Ozawa commented on YARN-2921:

[~leftnoteasy], could you take a look latest patch? This patch includes 
following changes:

1. I found that Thread.isAlive() doesn't work correctly in AsyncDispatcher when 
the state of thread is not referenced in busy loop. This problem looks a timing 
bug, and the change of MockRM reproduced the problem. It would be bug of JIT 
complication or something. but I don't track it deeply currently.
         while (!drained && eventHandlingThread.isAlive()) {
-          LOG.info("Waiting for AsyncDispatcher to drain.");
+          LOG.info("Waiting for AsyncDispatcher to drain. Thread state is :" +
+              eventHandlingThread.getState());
2. The failure of TestAMRestart is because of the change of period of polling. 
I made the timeout of submitApps larger.

> MockRM#waitForState methods can be too slow and flaky
> -----------------------------------------------------
>                 Key: YARN-2921
>                 URL: https://issues.apache.org/jira/browse/YARN-2921
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 2.6.0, 2.7.0
>            Reporter: Karthik Kambatla
>            Assignee: Tsuyoshi Ozawa
>         Attachments: YARN-2921.001.patch, YARN-2921.002.patch, 
> YARN-2921.003.patch, YARN-2921.004.patch, YARN-2921.005.patch, 
> YARN-2921.006.patch, YARN-2921.007.patch
> MockRM#waitForState methods currently sleep for too long (2 seconds and 1 
> second). This leads to slow tests and sometimes failures if the 
> App/AppAttempt moves to another state. 

This message was sent by Atlassian JIRA

Reply via email to