|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.mapreduce.TableRecordReaderImpl
@InterfaceAudience.Public @InterfaceStability.Stable public class TableRecordReaderImpl
Iterate over an HBase table data, return (ImmutableBytesWritable, Result) pairs.
| Field Summary | |
|---|---|
static String |
LOG_PER_ROW_COUNT
|
| Constructor Summary | |
|---|---|
TableRecordReaderImpl()
|
|
| Method Summary | |
|---|---|
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(org.apache.hadoop.mapreduce.InputSplit inputsplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Build the scanner. |
boolean |
nextKeyValue()
Positions the record reader to the next record. |
void |
restart(byte[] firstRow)
Restart from survivable exceptions by creating a new scanner. |
void |
setHTable(HTable htable)
Sets the HBase table. |
void |
setScan(Scan scan)
Sets the scan defining the actual details like columns etc. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LOG_PER_ROW_COUNT
| Constructor Detail |
|---|
public TableRecordReaderImpl()
| Method Detail |
|---|
public void restart(byte[] firstRow)
throws IOException
firstRow - The first row to start at.
IOException - When restarting fails.public void setHTable(HTable htable)
htable - The HTable to scan.public void setScan(Scan scan)
scan - The scan to set.
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputsplit,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
IOException, - InterruptedException
IOException
InterruptedExceptionpublic void close()
public ImmutableBytesWritable getCurrentKey()
throws IOException,
InterruptedException
IOException
InterruptedException - When the job is aborted.
public Result getCurrentValue()
throws IOException,
InterruptedException
IOException - When the value is faulty.
InterruptedException - When the job is aborted.
public boolean nextKeyValue()
throws IOException,
InterruptedException
true if there was another record.
IOException - When reading the record failed.
InterruptedException - When the job was aborted.public float getProgress()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||