Class TableHiveRecordReader

java.lang.Object
oracle.kv.hadoop.hive.table.TableHiveRecordReader
All Implemented Interfaces:
Closeable, AutoCloseable, RecordReader<Text,Text>

public class TableHiveRecordReader extends Object implements RecordReader<Text,Text>
Concrete implementation of RecordReader; used to read PrimaryKey/Row pairs from an InputSplit.

Note that this RecordReader is based on version 1 of MapReduce (as required by the Hive infrastructure), but wraps and delegates to a YARN based (MapReduce version 2) RecordReader. This is done because the RecordReader provided by Oracle NoSQL Database to support Hadoop integration is YARN based, and this class wishes to exploit and reuse the functionality already provided by the YARN based RecordReader class. - Note on Logging - Two loggers are currently employed by this class:

  • One logger based on Log4j version 1, accessed via the org.apache.commons.logging wrapper.
  • One logger based on the Log4j2 API.
Two loggers are necessary because Hive2 employs the Log4j2 logging mechanism, whereas logging in Big Data SQL 4.0 is still based on Log4j version 1. As a result, when one executes a Hive query and wishes to log output from this class, the Log4j2-based logger specified by this class must be added to the Hive2 logging configuration file. On the other hand, to log output from this class when executing a Big Data SQL query, the Log4j v1 logger must be added to the Big Data SQL logging configuration file. In the future, when Big Data SQL changes its logging mechanims from Log4j v1 to Log4j2, this class should be changed to employ only the Log4j2-based logger.