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 voidclose()booleanhasNext()Map.Entry<LogFileKey,LogFileValue>next()voidremove()-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIterator<Map.Entry<LogFileKey,LogFileValue>>- Throws:
IOException
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceIterator<Map.Entry<LogFileKey,LogFileValue>>
-
next
public Map.Entry<LogFileKey,LogFileValue> next()
- Specified by:
nextin interfaceIterator<Map.Entry<LogFileKey,LogFileValue>>
-
remove
public void remove()
- Specified by:
removein interfaceIterator<Map.Entry<LogFileKey,LogFileValue>>
-
-