Package oracle.kv.hadoop.hive.table
Class TableHiveRecordReader
java.lang.Object
oracle.kv.hadoop.hive.table.TableHiveRecordReader
- All Implemented Interfaces:
Closeable,AutoCloseable,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.
-
Constructor Details
-
TableHiveRecordReader
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceRecordReader<Text,Text> - Throws:
IOException
-
getPos
- Specified by:
getPosin interfaceRecordReader<Text,Text> - Throws:
IOException
-
getProgress
public float getProgress()- Specified by:
getProgressin interfaceRecordReader<Text,Text>
-
next
- Specified by:
nextin interfaceRecordReader<Text,Text> - Throws:
IOException
-
createKey
Get the current key.- Specified by:
createKeyin interfaceRecordReader<Text,Text> - Returns:
- the current key or null if there is no current key
-
createValue
Get the current value.- Specified by:
createValuein interfaceRecordReader<Text,Text> - Returns:
- the object that was read
-