@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) public abstract class ReaderBase extends Object implements HLog.Reader
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.hbase.regionserver.wal.CompressionContext |
compressionContext
Compression context to use reading.
|
protected org.apache.hadoop.conf.Configuration |
conf |
protected long |
edit |
protected boolean |
emptyCompressionContext |
protected long |
fileLength |
protected org.apache.hadoop.fs.FileSystem |
fs |
protected org.apache.hadoop.fs.Path |
path |
protected WALProtos.WALTrailer |
trailer |
protected int |
trailerWarnSize |
| Constructor and Description |
|---|
ReaderBase()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
WALProtos.WALTrailer |
getWALTrailer() |
protected abstract boolean |
hasCompression() |
protected abstract boolean |
hasTagCompression() |
void |
init(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataInputStream stream) |
protected abstract void |
initAfterCompression()
Initializes the compression after the shared stuff has been initialized.
|
protected abstract void |
initAfterCompression(String cellCodecClsName)
Initializes the compression after the shared stuff has been initialized.
|
protected abstract String |
initReader(org.apache.hadoop.fs.FSDataInputStream stream)
Initializes the log reader with a particular stream (may be null).
|
HLog.Entry |
next() |
HLog.Entry |
next(HLog.Entry reuse) |
protected abstract boolean |
readNext(HLog.Entry e)
Read next entry.
|
void |
seek(long pos) |
protected abstract void |
seekOnFs(long pos)
Performs a filesystem-level seek to a certain position in an underlying file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getPosition, resetprotected org.apache.hadoop.conf.Configuration conf
protected org.apache.hadoop.fs.FileSystem fs
protected org.apache.hadoop.fs.Path path
protected long edit
protected long fileLength
protected WALProtos.WALTrailer trailer
protected int trailerWarnSize
protected org.apache.hadoop.hbase.regionserver.wal.CompressionContext compressionContext
protected boolean emptyCompressionContext
public void init(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FSDataInputStream stream)
throws IOException
init in interface HLog.Readerfs - File system.path - Path.conf - Configuration.stream - Input stream that may have been pre-opened by the caller; may be null.IOExceptionpublic HLog.Entry next() throws IOException
next in interface HLog.ReaderIOExceptionpublic HLog.Entry next(HLog.Entry reuse) throws IOException
next in interface HLog.ReaderIOExceptionpublic void seek(long pos)
throws IOException
seek in interface HLog.ReaderIOExceptionprotected abstract String initReader(org.apache.hadoop.fs.FSDataInputStream stream) throws IOException
IOExceptionprotected abstract void initAfterCompression()
throws IOException
IOExceptionprotected abstract void initAfterCompression(String cellCodecClsName) throws IOException
cellCodecClsName - class name of cell CodecIOExceptionprotected abstract boolean hasCompression()
protected abstract boolean hasTagCompression()
protected abstract boolean readNext(HLog.Entry e) throws IOException
e - The entry to read into.IOExceptionprotected abstract void seekOnFs(long pos)
throws IOException
IOExceptionpublic WALProtos.WALTrailer getWALTrailer()
getWALTrailer in interface HLog.ReaderCopyright © 2014 The Apache Software Foundation. All rights reserved.