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

LongWritable.compareTo needs shimming

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Compiled hive against hadoop-2. Running tests on hadoop 1 gives:

      Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.io.LongWritable.compareTo(Lorg/apache/hadoop/io/LongWritable;)I
      at org.apache.hadoop.hive.ql.udf.UDAFPercentile$MyComparator.compare(UDAFPercentile.java:62)
      at org.apache.hadoop.hive.ql.udf.UDAFPercentile$MyComparator.compare(UDAFPercentile.java:58)
      at java.util.Arrays.mergeSort(Arrays.java:1270)
      at java.util.Arrays.sort(Arrays.java:1210)
      at java.util.Collections.sort(Collections.java:157)
      at org.apache.hadoop.hive.ql.udf.UDAFPercentile$PercentileLongEvaluator.terminate(UDAFPercentile.java:194)
      ... 20 more

      I think the problem is that the compareTo function has changed from using Object to using LongWritable as an argument. Seems this needs a shim. However, we should also make sure that this shim doesn't hit performance too hard.

        Attachments

        1. HIVE-6105.1.patch.txt
          8 kB
          Navis
        2. HIVE-6105.1.patch
          8 kB
          Gunther Hagleitner

          Issue Links

            Activity

              People

              • Assignee:
                navis Navis
                Reporter:
                hagleitn Gunther Hagleitner
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: