Package org.apache.hadoop.hbase.wal
Interface WALStreamReader
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ProtobufWALStreamReader
A one way WAL reader, without reset and seek support.
In most cases you should use this interface to read WAL file, as the implementation is simple and
robust. For replication, where we want to tail the WAL file which is currently being written, you
should use
WALTailingReader instead.- See Also:
-
Method Summary
-
Method Details
-
next
Read the next entry in WAL. In most cases you should just use this method, especially when reading a closed wal file for splitting or printing.- Throws:
IOException
-
next
Read the next entry in WAL, use the givenWAL.Entryif notnullto hold the data. Mainly used in MR.- Parameters:
reuse- the entry to be used for reading, can benull- Throws:
IOException
-
getPosition
Get the current reading position.- Throws:
IOException
-
close
void close()Override to remove the 'throws IOException' as we are just a reader.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-