public class TableRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>
| Constructor and Description |
|---|
TableRecordReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the split.
|
org.ojai.Value |
getCurrentKey()
Returns the current key.
|
org.ojai.Document |
getCurrentValue()
Returns the current value.
|
float |
getProgress()
The current progress of the record reader through its data.
|
void |
initialize(org.apache.hadoop.mapreduce.InputSplit inputsplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Initializes the reader.
|
boolean |
nextKeyValue()
Positions the record reader to the next record.
|
void |
setCondition(org.ojai.store.QueryCondition c) |
void |
setFieldPath(java.lang.String fieldPath) |
void |
setTable(com.mapr.db.Table jTable) |
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>RecordReader.close()public org.ojai.Value getCurrentKey()
throws java.io.IOException,
java.lang.InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>java.io.IOExceptionjava.lang.InterruptedException - When the job is aborted.RecordReader.getCurrentKey()public org.ojai.Document getCurrentValue()
throws java.io.IOException,
java.lang.InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>java.io.IOException - When the value is faulty.java.lang.InterruptedException - When the job is aborted.RecordReader.getCurrentValue()public void initialize(org.apache.hadoop.mapreduce.InputSplit inputsplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException,
java.lang.InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>inputsplit - The split to work with.context - The current task context.java.io.IOException - When setting up the reader fails.java.lang.InterruptedException - When the job is aborted.RecordReader.initialize(
org.apache.hadoop.mapreduce.InputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext)public boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>true if there was another record.java.io.IOException - When reading the record failed.java.lang.InterruptedException - When the job was aborted.RecordReader.nextKeyValue()public float getProgress()
getProgress in class org.apache.hadoop.mapreduce.RecordReader<org.ojai.Value,org.ojai.Document>RecordReader.getProgress()public void setTable(com.mapr.db.Table jTable)
public void setCondition(org.ojai.store.QueryCondition c)
public void setFieldPath(java.lang.String fieldPath)