Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1219

Add support for grouping comparators without an implementation of the RawComparator interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.7.3
    • None
    • java
    • None

    Description

      From http://mail-archives.apache.org/mod_mbox/avro-user/201212.mbox/%3CCAFZSZPvKcSTf84hwqOhZ7OchtcnxmDwp1krYaaq2qsLDtV0brw%40mail.gmail.com%3E

      Summary:
      If you want to use a grouping comparator with the "new" mapreduce API and Avro, you must provide an implementation of RawComparator compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2).

      In standard mapreduce, you don't have to do this. Hadoop does it for you behind the scenes by deserializing the writables and calling compare(x,y)
      instead.

      We should provide a subclass of AvroKeyComparator which does the deserialization and delegates to compare(x,y) to be consistent with Hadoop mapreduce.

      Attachments

        Activity

          People

            dbeech Dave Beech
            dbeech Dave Beech
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: