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

Hive Streaming should expose encoding and serdes for testing

    XMLWordPrintableJSON

Details

    • Incompatible change
    • Any extensions of org.apache.hive.hcatalog.streaming.AbstractRecordWriter will need to implement two new public methods, SerDe and encode.

    Description

      Currently how records are passed into the hive streaming RecordWriter are converted from the inbound format to Hive format is opaque. The encoding and writing are done in a single call to RecordWriter.write(). This is problematic for test tools that want to intercept the record stream and write it to a benchmark in addition to Hive.

      All existing RecordWriters have an encode and getSerDe methods. I propose to expose these by making them public in AbstractRecordWriter, and making AbstractRecordWriter a public class (it is currently package private). This keeps the RecordWriter interface clean (stream writers will not need to directly call these methods) and avoids any backwards incompatible changes. Having AbstractRecordWriter public is also desirable for anyone who wants to write their own RecordWriter.

      Attachments

        1. HIVE-12443.patch
          4 kB
          Alan Gates

        Activity

          People

            gates Alan Gates
            gates Alan Gates
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: