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.