@InterfaceAudience.Public @InterfaceStability.Stable public class TableRecordReader extends org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>
| 构造器和说明 |
|---|
TableRecordReader() |
| 限定符和类型 | 方法和说明 |
|---|---|
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)
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 |
setHTable(Table htable)
已过时。
Use setTable() instead.
|
void |
setScan(Scan scan)
Sets the scan defining the actual details like columns etc.
|
void |
setTable(Table table) |
public void restart(byte[] firstRow)
throws IOException
firstRow - The first row to start at.IOException - When restarting fails.@Deprecated public void setHTable(Table htable)
htable - The table to scan.public void setScan(Scan scan)
scan - The scan to set.public void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>RecordReader.close()public ImmutableBytesWritable getCurrentKey() throws IOException, InterruptedException
getCurrentKey 在类中 org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>IOExceptionInterruptedException - When the job is aborted.RecordReader.getCurrentKey()public Result getCurrentValue() throws IOException, InterruptedException
getCurrentValue 在类中 org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>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 在类中 org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>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 在类中 org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>true if there was another record.IOException - When reading the record failed.InterruptedException - When the job was aborted.RecordReader.nextKeyValue()public float getProgress()
getProgress 在类中 org.apache.hadoop.mapreduce.RecordReader<ImmutableBytesWritable,Result>RecordReader.getProgress()Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.