Class ProtobufWALStreamReader
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.AbstractProtobufWALReader
org.apache.hadoop.hbase.regionserver.wal.ProtobufWALStreamReader
- All Implemented Interfaces:
Closeable,AutoCloseable,AbstractFSWALProvider.Initializer,WALStreamReader
@Private
public class ProtobufWALStreamReader
extends AbstractProtobufWALReader
implements WALStreamReader, AbstractFSWALProvider.Initializer
A one way stream reader for reading protobuf based WAL file.
-
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.regionserver.wal.AbstractProtobufWALReader
byteStringUncompressor, cellDecoder, codecClsName, compressionCtx, conf, decryptor, DEFAULT_WAL_TRAILER_WARN_SIZE, fileLength, fs, hasCompression, hasTagCompression, hasValueCompression, inputStream, path, PB_WAL_COMPLETE_MAGIC, PB_WAL_MAGIC, trailer, trailerPresent, trailerWarnSize, valueCompressionType, WAL_TRAILER_WARN_SIZE, walEditsStopOffset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected InputStreamgetCellCodecInputStream(org.apache.hadoop.fs.FSDataInputStream stream) Get or create the input stream used by cell decoder.Read the next entry in WAL, use the givenWAL.Entryif notnullto hold the data.protected voidskipTo(long position) Skip to the given position.Methods inherited from class org.apache.hadoop.hbase.regionserver.wal.AbstractProtobufWALReader
close, extractHiddenEof, getCodecClsName, getPosition, getPositionQuietly, getWriterClsNames, init, initWALCellCodec, isWALTrailer, open, reachWALEditsStopOffset, readHeader, readTrailer, trailerSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.wal.AbstractFSWALProvider.Initializer
initMethods inherited from interface org.apache.hadoop.hbase.wal.WALStreamReader
close, getPosition, next
-
Field Details
-
LOG
-
-
Constructor Details
-
ProtobufWALStreamReader
public ProtobufWALStreamReader()
-
-
Method Details
-
next
Description copied from interface:WALStreamReaderRead the next entry in WAL, use the givenWAL.Entryif notnullto hold the data. Mainly used in MR.- Specified by:
nextin interfaceWALStreamReader- Parameters:
reuse- the entry to be used for reading, can benull- Throws:
IOException
-
getCellCodecInputStream
Description copied from class:AbstractProtobufWALReaderGet or create the input stream used by cell decoder. For implementing replication, we may need to limit the bytes we can read, so here we provide a method so subclasses can wrap the original input stream.- Specified by:
getCellCodecInputStreamin classAbstractProtobufWALReader
-
skipTo
Description copied from class:AbstractProtobufWALReaderSkip to the given position.- Specified by:
skipToin classAbstractProtobufWALReader- Throws:
IOException
-