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>
IOException
InterruptedException
private void openReader(org.apache.hadoop.fs.Path path) throws IOException
IOException
private void setCurrentPath(org.apache.hadoop.fs.Path path)
private void closeReader() throws IOException
IOException
private void seek() throws IOException
IOException
public boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue
in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>
IOException
InterruptedException
public WALEdit getCurrentValue() throws IOException, InterruptedException
getCurrentValue
in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>
IOException
InterruptedException
public float getProgress() throws IOException, InterruptedException
getProgress
in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>
IOException
InterruptedException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class org.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit>
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.