Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-1955

PhysicalOperator has a member variable (non-static) Log object that is non-transient, this causes serialization errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0, 0.9.0
    • 0.9.0
    • impl
    • None
    • Patch Available
    • Reviewed
    • fix Serialzeable bug in PhysicalOperator, mark log as transient

    Description

      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());

      Attachments

        1. 1955-static-0_8_1.patch
          20 kB
          Jeremy Hanna
        2. 1955-static-0_8_1.patch
          20 kB
          Jeremy Hanna
        3. 1955-static.patch
          20 kB
          Woody Anderson
        4. 1955-po.patch
          21 kB
          Woody Anderson
        5. 1955.patch
          0.7 kB
          Woody Anderson

        Activity

          People

            woody.anderson@gmail.com Woody Anderson
            woody.anderson@gmail.com Woody Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: