Hive
  1. Hive
  2. HIVE-1686

XMLEncoder failing to serialize classes containing Enums for non-SUN JREs

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      SLES 10 SP2, IBM Java 1.6 SR8

      Description

      If one is using Hive 0.5 with IBM Java 1.6 certain Hive Queries will fail in the Hive CLI, such as "SELECT Count(1) from TABLE" with the error "failed to write expression: GenericUDAFEvaluator$Mode=Class.new()". This is due to the fact that XMLEncoder in the JRE's beans.jar is not able to serialize Classes with Enums without an explicitly having an EnumPersistenceDelegate assigned to each class that needs to be serialized. This was an issue in SUN JDK 1.5 but not 1.6 and is still an issue in IBM Java 1.6.

      1. HIVE-1686.patch
        1 kB
        Stephen Watt

        Activity

        Carl Steinbach made changes -
        Fix Version/s 0.5.1 [ 12314793 ]
        Hide
        Stephen Watt added a comment -

        This issue will also be fixed in the JRE with the next release of IBM Java 1.6 (SR9) around the Dec 2010 timeframe.

        Show
        Stephen Watt added a comment - This issue will also be fixed in the JRE with the next release of IBM Java 1.6 (SR9) around the Dec 2010 timeframe.
        Hide
        Stephen Watt added a comment -

        To resolve this issue, I have provided a patch that has added a variety of enumPersistenceDelegates for the classes throwing this Exception to the XMLEncoder in org.apache.hadoop.hive.ql.exec.Utilities.serializeMapRedWork()

        Show
        Stephen Watt added a comment - To resolve this issue, I have provided a patch that has added a variety of enumPersistenceDelegates for the classes throwing this Exception to the XMLEncoder in org.apache.hadoop.hive.ql.exec.Utilities.serializeMapRedWork()
        Stephen Watt made changes -
        Field Original Value New Value
        Attachment HIVE-1686.patch [ 12456142 ]
        Stephen Watt created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Stephen Watt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development