public class TableRecordReader
extends <any>
Constructor and Description |
---|
TableRecordReader() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the split.
|
ImmutableBytesWritable |
getCurrentKey()
Returns the current key.
|
Result |
getCurrentValue()
Returns the current value.
|
float |
getProgress()
The current progress of the record reader through its data.
|
void |
initialize(InputSplit inputsplit,
TaskAttemptContext context)
Initializes the reader.
|
boolean |
nextKeyValue()
Positions the record reader to the next record.
|
void |
restart(byte[] firstRow)
Restart from survivable exceptions by creating a new scanner.
|
void |
setScan(Scan scan)
Sets the scan defining the actual details like columns etc.
|
void |
setTable(Table table) |
public void restart(byte[] firstRow) throws java.io.IOException
firstRow
- The first row to start at.java.io.IOException
- When restarting fails.public void setTable(Table table)
table
- the Table
to scan.public void setScan(Scan scan)
scan
- The scan to set.public void close()
org.apache.hadoop.mapreduce.RecordReader#close()
public ImmutableBytesWritable getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
- When the job is aborted.org.apache.hadoop.mapreduce.RecordReader#getCurrentKey()
public Result getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
- When the value is faulty.java.lang.InterruptedException
- When the job is aborted.org.apache.hadoop.mapreduce.RecordReader#getCurrentValue()
public void initialize(InputSplit inputsplit, TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
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.org.apache.hadoop.mapreduce.RecordReader#initialize(
org.apache.hadoop.mapreduce.InputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext)
public boolean nextKeyValue() throws java.io.IOException, java.lang.InterruptedException
true
if there was another record.java.io.IOException
- When reading the record failed.java.lang.InterruptedException
- When the job was aborted.org.apache.hadoop.mapreduce.RecordReader#nextKeyValue()
public float getProgress()
org.apache.hadoop.mapreduce.RecordReader#getProgress()