Class WALInputFormat.WALRecordReader<K extends WALKey>
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<K,WALEdit>
org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader<K>
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
WALInputFormat.WALKeyRecordReader
- Enclosing class:
- WALInputFormat
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.conf.Configuration(package private) WAL.Entryprivate longprivate longprivate org.apache.hadoop.fs.Pathprivate WALStreamReaderprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private voidfloatvoidinitialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) booleanprivate voidopenReader(org.apache.hadoop.fs.Path path) private WALStreamReaderopenReader(org.apache.hadoop.fs.Path path, long startPosition) private voidsetCurrentPath(org.apache.hadoop.fs.Path path) Methods inherited from class org.apache.hadoop.mapreduce.RecordReader
getCurrentKey
-
Field Details
-
reader
-
currentEntry
-
startTime
-
endTime
-
conf
-
logFile
-
currentPos
-
-
Constructor Details
-
WALRecordReader
-
-
Method Details
-
openReader
private WALStreamReader openReader(org.apache.hadoop.fs.Path path, long startPosition) throws IOException - Throws:
IOException
-
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException - Specified by:
initializein classorg.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit> - Throws:
IOExceptionInterruptedException
-
openReader
- Throws:
IOException
-
setCurrentPath
-
closeReader
- Throws:
IOException
-
nextKeyValue
- Specified by:
nextKeyValuein classorg.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit> - Throws:
IOExceptionInterruptedException
-
getCurrentValue
- Specified by:
getCurrentValuein classorg.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit> - Throws:
IOExceptionInterruptedException
-
getProgress
- Specified by:
getProgressin classorg.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit> - Throws:
IOExceptionInterruptedException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.hadoop.mapreduce.RecordReader<K extends WALKey,WALEdit> - Throws:
IOException
-