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

Allow implementations to access member variables of AbstractRecordWriter

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.1.0
    • Fix Version/s: 3.0.0, 3.1.0
    • Component/s: Streaming
    • Labels:
      None

      Description

      The AbstractRecordWriter class in the Hive 3 Streaming API (package org.apache.hive.streaming) provides common functionality for processing incoming records (each as a byte[]) where subclasses often need only to implement the encode() and createSerde() methods and let AbstractRecordWriter handle the rest.

      However for some custom RecordWriters, the records may not be available as a byte array, and thus the custom RecordWriter may need to handle the writes and the "paperwork" such as connection stats updates (number of records written, e.g.), basically the same code that is in the write(long, byte[]) method. To do that, the subclass will need access to the member variables of AbstractRecordWriter, which are currently private. The same likely holds for the private methods.

      This Jira proposes to make the member variables and methods of AbstractRecordWriter protected (or package-protected) as prudent. 

        Attachments

        1. HIVE-19534.1.patch
          10 kB
          Prasanth Jayachandran

          Activity

            People

            • Assignee:
              prasanth_j Prasanth Jayachandran
              Reporter:
              mattyb149 Matt Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: