abstract static class WALInputFormat.WALRecordReader<K extends WALKey> extends org.apache.hadoop.mapreduce.RecordReader<K,WALEdit>
RecordReader for an WAL file.
Implementation shared with deprecated HLogInputFormat.| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.conf.Configuration |
conf |
(package private) WAL.Entry |
currentEntry |
private long |
currentPos |
private long |
endTime |
private org.apache.hadoop.fs.Path |
logFile |
private WAL.Reader |
reader |
private long |
startTime |
| Constructor and Description |
|---|
WALRecordReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private void |
closeReader() |
WALEdit |
getCurrentValue() |
float |
getProgress() |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context) |
boolean |
nextKeyValue() |
private void |
openReader(org.apache.hadoop.fs.Path path) |
private void |
seek() |
private void |
setCurrentPath(org.apache.hadoop.fs.Path path) |
private WAL.Reader reader
WAL.Entry currentEntry
private long startTime
private long endTime
private org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.fs.Path logFile
private long currentPos
WALRecordReader()
public void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>IOExceptionInterruptedExceptionprivate void openReader(org.apache.hadoop.fs.Path path) throws IOException
IOExceptionprivate void setCurrentPath(org.apache.hadoop.fs.Path path)
private void closeReader() throws IOException
IOExceptionprivate void seek() throws IOException
IOExceptionpublic boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>IOExceptionInterruptedExceptionpublic WALEdit getCurrentValue() throws IOException, InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>IOExceptionInterruptedExceptionpublic float getProgress() throws IOException, InterruptedException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>IOExceptionInterruptedExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.