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

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.
{code}
         while (!drained && eventHandlingThread.isAlive()) {
           waitForDrained.wait(1000);
-          LOG.info("Waiting for AsyncDispatcher to drain.");
+          LOG.info("Waiting for AsyncDispatcher to drain. Thread state is :" +
+              eventHandlingThread.getState());
         }
{code}
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
(v6.3.4#6332)

Reply via email to