Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-3241

GenericUDAF when packaged as a JAR raises IllegalAccessException unless the JAR is placed in lib dir

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 0.9.0
    • None
    • UDF
    • None

    Description

      GenericUDAFEvaluator has a member variable "Mode" which is protected. Accessing mode in a GenericUDAF class raises IllegalAccessException when packaged as a jar. This looks like a class loader issue because the error doesn't occur when the jar is placed in HIVE_LIB directory. The fix for this issue is to provide public getters for member variable mode in GenericUDAFEvaluator.

      Steps to reproduce,

      Copy the attached jar to a dir other than HIVE_LIB

      On a hive shell,

      add jar <path-to-jar>

      create temporary function compute_stats as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFComputeStats';

      select compute_stats(some_col) from some_table;

      Attachments

        1. HIVE-3241.1.patch
          0.5 kB
          Alexander Pivovarov
        2. compute-stats.jar
          32 kB
          Shreepadma Venugopalan

        Activity

          People

            Unassigned Unassigned
            shreepadma Shreepadma Venugopalan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: