Package org.apache.accumulo.tserver.log
Class RecoveryLogReader
- java.lang.Object
-
- org.apache.accumulo.tserver.log.RecoveryLogReader
-
- All Implemented Interfaces:
AutoCloseable
,Iterator<Map.Entry<LogFileKey,LogFileValue>>
,CloseableIterator<Map.Entry<LogFileKey,LogFileValue>>
public class RecoveryLogReader extends Object implements CloseableIterator<Map.Entry<LogFileKey,LogFileValue>>
A class which reads sorted recovery logs produced from a single WAL. Presently only supports next() and seek() and works on all the Map directories within a directory. The primary purpose of this class is to merge the results of multiple Reduce jobs that result in Map output files.
-
-
Constructor Summary
Constructors Constructor Description RecoveryLogReader(VolumeManager fs, org.apache.hadoop.fs.Path directory)
RecoveryLogReader(VolumeManager fs, org.apache.hadoop.fs.Path directory, LogFileKey start, LogFileKey end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasNext()
Map.Entry<LogFileKey,LogFileValue>
next()
void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
RecoveryLogReader
public RecoveryLogReader(VolumeManager fs, org.apache.hadoop.fs.Path directory) throws IOException
- Throws:
IOException
-
RecoveryLogReader
public RecoveryLogReader(VolumeManager fs, org.apache.hadoop.fs.Path directory, LogFileKey start, LogFileKey end) throws IOException
- Throws:
IOException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseableIterator<Map.Entry<LogFileKey,LogFileValue>>
- Throws:
IOException
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<Map.Entry<LogFileKey,LogFileValue>>
-
next
public Map.Entry<LogFileKey,LogFileValue> next()
- Specified by:
next
in interfaceIterator<Map.Entry<LogFileKey,LogFileValue>>
-
remove
public void remove()
- Specified by:
remove
in interfaceIterator<Map.Entry<LogFileKey,LogFileValue>>
-
-