[ 
https://issues.apache.org/jira/browse/YARN-1978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vinod Kumar Vavilapalli updated YARN-1978:
------------------------------------------

    Attachment: YARN-1978.txt

The problem was that the test stops the DeletionService and expects that the 
files are deleted. But as part of the stop, DeletionService first shutsdown the 
ThreadPoolExecutor - this causes all pending tasks to be aborted. We anyways 
want to wait for a hardcoded time of 10 seconds for running tasks to finish. So 
I do the following in the patch
 - Change the DeletionService#stop() so that even pending tasks get this 10 
seconds grace period.
 - Add more logic to avoid new tasks getting added to the service when the 
service is being shutdown.

The test passes consistently after this patch.

The other option was to just hack the test to wait for a while - which I didn't 
do for obvious reasons.

> TestLogAggregationService#testLocalFileDeletionAfterUpload fails sometimes
> --------------------------------------------------------------------------
>
>                 Key: YARN-1978
>                 URL: https://issues.apache.org/jira/browse/YARN-1978
>             Project: Hadoop YARN
>          Issue Type: Test
>            Reporter: Vinod Kumar Vavilapalli
>            Assignee: Vinod Kumar Vavilapalli
>         Attachments: YARN-1978.txt
>
>
> This happens in a Windows VM, though the issue isn't related to Windows.
> {code}
> -------------------------------------------------------------------------------
> Test set: 
> org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.TestLogAggregationService
> -------------------------------------------------------------------------------
> Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 6.859 sec 
> <<< FAILURE! - in 
> org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.TestLogAggregationService
> testLocalFileDeletionAfterUpload(org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.TestLogAggregationService)
>   Time elapsed: 0.906 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: check 
> Y:\hadoop-yarn-project\hadoop-yarn\hadoop-yarn-server\hadoop-yarn-server-nodemanager\target\TestLogAggregationService-localLogDir\application_1234_0001\container_1234_0001_01_000001\stdout
>         at junit.framework.Assert.fail(Assert.java:50)
>         at junit.framework.Assert.assertTrue(Assert.java:20)
>         at junit.framework.Assert.assertFalse(Assert.java:34)
>         at 
> org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation.TestLogAggregationService.testLocalFileDeletionAfterUpload(TestLogAggregationService.java:201)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to