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

Szilard Nemeth commented on YARN-8438:
--------------------------------------

Hi [~miklos.szeg...@cloudera.com]!

Indeed it's a valid case you mentioned, I fixed the implementation to handle 
this case as well.

Also applied synchronized to the method header.

What did you mean about using inheritance instead of reclection?

ContainerImpl.clock is a private static so extending from this class for the 
purpose of replacing the clock in tests does not make sense for me.

While I was thinking about your comment I realized that I forgot to save and 
restore the original clock of ContainerImpl so I extended my patch with this 
chunk of code.

Please see my updated patch.

> TestContainer.testKillOnNew flaky on trunk
> ------------------------------------------
>
>                 Key: YARN-8438
>                 URL: https://issues.apache.org/jira/browse/YARN-8438
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>            Reporter: Szilard Nemeth
>            Assignee: Szilard Nemeth
>            Priority: Major
>         Attachments: YARN-8438.001.patch, YARN-8438.002.patch, 
> YARN-8438.003.patch, YARN-8438.004.patch
>
>
> Running this test several times (e.g. 30), it fails ~5-10 times.
> Stacktrace: 
> {code:java}
> java.lang.AssertionError at org.junit.Assert.fail(Assert.java:86) at 
> org.junit.Assert.assertTrue(Assert.java:41) at 
> org.junit.Assert.assertTrue(Assert.java:52) at 
> org.apache.hadoop.yarn.server.nodemanager.containermanager.container.TestContainer.testKillOnNew(TestContainer.java:594)
> {code}
> TestContainer:594 is the following code in trunk, currently:
> {code:java}
> Assert.assertTrue( containerMetrics.finishTime.value() > 
> containerMetrics.startTime .value());
> {code}
> So sometimes the finish time is not greater than the start time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to