public class TableRecordReader extends org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>
| Constructor and Description |
|---|
TableRecordReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the split.
|
ByteBufWritableComparable |
getCurrentKey()
Returns the current key.
|
com.mapr.db.DBDocument |
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(com.mapr.db.Condition c) |
void |
setFieldPath(String fieldPath) |
void |
setTable(com.mapr.db.Table jTable) |
public void close()
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>RecordReader.close()public ByteBufWritableComparable getCurrentKey() throws IOException, InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>IOExceptionInterruptedException - When the job is aborted.RecordReader.getCurrentKey()public com.mapr.db.DBDocument getCurrentValue()
throws IOException,
InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>IOException - When the value is faulty.InterruptedException - When the job is aborted.RecordReader.getCurrentValue()public void initialize(org.apache.hadoop.mapreduce.InputSplit inputsplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>inputsplit - The split to work with.context - The current task context.IOException - When setting up the reader fails.InterruptedException - When the job is aborted.RecordReader.initialize(
org.apache.hadoop.mapreduce.InputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext)public boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>true if there was another record.IOException - When reading the record failed.InterruptedException - When the job was aborted.RecordReader.nextKeyValue()public float getProgress()
getProgress in class org.apache.hadoop.mapreduce.RecordReader<ByteBufWritableComparable,com.mapr.db.DBDocument>RecordReader.getProgress()public void setTable(com.mapr.db.Table jTable)
public void setCondition(com.mapr.db.Condition c)
public void setFieldPath(String fieldPath)
Copyright © 2015 Mapr Technologies, Inc.. All rights reserved.