[
https://issues.apache.org/jira/browse/PIG-4039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rohini Palaniswamy updated PIG-4039:
------------------------------------
Attachment: PIG-4039-2.patch
Thanks Daniel. Checked into branch-0.14 and trunk. Had to remove a @Override
that was added to getProgress() in PigStatusReporter as that failed compilation
in Hadoop 1.x. PIG-4039-2.patch is the final patch checked in.
> New interface for resetting static variables
> --------------------------------------------
>
> Key: PIG-4039
> URL: https://issues.apache.org/jira/browse/PIG-4039
> Project: Pig
> Issue Type: Sub-task
> Components: tez
> Reporter: Rohini Palaniswamy
> Assignee: Rohini Palaniswamy
> Fix For: 0.14.0
>
> Attachments: PIG-4039-1.patch, PIG-4039-2.patch
>
>
> In Tez, when there is container reuse, static variables, thread locals, etc
> have to be reinitialized to avoid memory leak or having wrong values. For the
> short term, we ended up making some of the static variables public or adding
> destroy method to each class which is hacky. Also it does not help users who
> will want something similar to be done in their UDFs or LoadFunc. Need to
> define a interface with a reset/destroy method and find all loaded classes
> implementing that interface and call destroy on them in PigProcessor.close().
> ServiceLoader and annotations are some of the ways to find classes
> implementing an interface and there are other libraries as well. Need to find
> the best and fastest way to do that.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)