[
https://issues.apache.org/jira/browse/PIG-3797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924185#comment-13924185
]
Rohini Palaniswamy commented on PIG-3797:
-----------------------------------------
ThreadLocal.remove() only "Removes the current thread's value for this
thread-local variable". Reinitializing it so that the old object gets garbage
collected. I did not find any equivalent method to clear thread-local variable
of all threads. Since the PigProcessor.close() can be called by Tez using any
thread, just removing the current thread's value will not work.
> Fix some memory leaks affecting container reuse
> -----------------------------------------------
>
> Key: PIG-3797
> URL: https://issues.apache.org/jira/browse/PIG-3797
> Project: Pig
> Issue Type: Sub-task
> Components: tez
> Reporter: Rohini Palaniswamy
> Assignee: Rohini Palaniswamy
> Fix For: tez-branch
>
> Attachments: PIG-3797-1.patch
>
>
> PigCombiner.sJobContext and PhysicalOperator.reporter hold references to the
> WrappedReducer$Context which in turn holds TezOutputContextImpl which holds
> references to the buffers in DefaultSorter. This was causing OOM after the
> container was reused 2 or 3 times. Debugged this with L17.pig in pigmix.
--
This message was sent by Atlassian JIRA
(v6.2#6252)