[ 
https://issues.apache.org/jira/browse/HADOOP-4202?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632664#action_12632664
 ] 

Steve Loughran commented on HADOOP-4202:
----------------------------------------

looking at the code in HADOOP-3628 to shut down the threads in more detail, 
there is a fair amount of work at the end of TaskTracker to do this

- a TaskCleanupThread class is defined that can be terminated by calling its 
terminate() method; this flips a volatile flag and interrupts the loop.

- the CleanupQueue has a special EndQueue class that can be pushed into the 
cleanup queue; when this is hit the task ends. TestCleanupQueue verifies that 
is all works.

I'd advocate not worrying about this for versions <0.20 as it only arises in 
testing when you are running lots of test cases in the same VM, perhaps under 
an IDE. It should not surface in production where the process gets terminated. 
When the 3628 lifecycle work does get merged in, this is included as part of 
the feature set. 

> TaskTracker never stops cleanup threads, MiniMRCluster becomes unstable
> -----------------------------------------------------------------------
>
>                 Key: HADOOP-4202
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4202
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 0.18.0
>            Reporter: Chris K Wensel
>            Assignee: Chris K Wensel
>
> If many unit tests start/stop unique MiniMRCluster instances, over time the 
> number of threads in the test vm grow to large causing tests to hang and/or 
> slow down.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to