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>
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.
 
 
- 
- 
Constructor Summary
Constructors Constructor Description TableHiveRecordReader(JobConf jobConf, TableRecordReader v2RecordReader) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()TextcreateKey()Get the current key.TextcreateValue()Get the current value.longgetPos()floatgetProgress()booleannext(Text key, Text value) 
 - 
 
- 
- 
Constructor Detail
- 
TableHiveRecordReader
public TableHiveRecordReader(JobConf jobConf, TableRecordReader v2RecordReader)
 
 - 
 
- 
Method Detail
- 
close
public void close() throws IOException- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceCloseable- Specified by:
 closein interfaceRecordReader<Text,Text>- Throws:
 IOException
 
- 
getPos
public long getPos() throws IOException- Specified by:
 getPosin interfaceRecordReader<Text,Text>- Throws:
 IOException
 
- 
getProgress
public float getProgress()
- Specified by:
 getProgressin interfaceRecordReader<Text,Text>
 
- 
next
public boolean next(Text key, Text value) throws IOException
- Specified by:
 nextin interfaceRecordReader<Text,Text>- Throws:
 IOException
 
- 
createKey
public Text createKey()
Get the current key.- Specified by:
 createKeyin interfaceRecordReader<Text,Text>- Returns:
 - the current key or null if there is no current key
 
 
- 
createValue
public Text createValue()
Get the current value.- Specified by:
 createValuein interfaceRecordReader<Text,Text>- Returns:
 - the object that was read
 
 
 - 
 
 -