You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Jeremy Hanna (JIRA)" <ji...@apache.org> on 2011/09/21 17:33:13 UTC

[jira] [Updated] (PIG-1955) PhysicalOperator has a member variable (non-static) Log object that is non-transient, this causes serialization errors

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

Jeremy Hanna updated PIG-1955:
------------------------------

    Attachment: 1955-static-0_8_1.patch

Attaching a patch that cleanly applies against 0.8.1.  I tested it with what was locally failing and it fixed the problem.

> PhysicalOperator has a member variable (non-static) Log object that is non-transient, this causes serialization errors
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIG-1955
>                 URL: https://issues.apache.org/jira/browse/PIG-1955
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0, 0.9.0
>            Reporter: Woody Anderson
>            Assignee: Woody Anderson
>             Fix For: 0.9.0
>
>         Attachments: 1955-po.patch, 1955-static-0_8_1.patch, 1955-static.patch, 1955.patch
>
>
> I found this while trying to write unit tests. Creating a local PigServer to test my LoadFunc caused a serialization of the PhysicalOperator class, which failed due to:
> ..
> Caused by: java.io.NotSerializableException: org.apache.commons.logging.impl.Log4JCategoryLog
> ..
> this is easily fixed by adding the transient keyword to the definition of log.
> e.g.
> on trunk:
>     private final transient Log log = LogFactory.getLog(getClass());
> on the 0.8 tag:
>     private transient Log log = LogFactory.getLog(getClass());

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira