@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) public abstract class ReaderBase extends java.lang.Object implements DefaultWALProvider.Reader
| Modifier and Type | Field and Description |
|---|---|
protected CompressionContext |
compressionContext
Compression context to use reading.
|
protected Configuration |
conf |
protected long |
edit |
protected boolean |
emptyCompressionContext |
protected long |
fileLength |
protected FileSystem |
fs |
protected Path |
path |
| Constructor and Description |
|---|
ReaderBase()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
hasCompression() |
protected abstract boolean |
hasTagCompression() |
void |
init(FileSystem fs,
Path path,
Configuration conf,
FSDataInputStream stream) |
protected abstract void |
initAfterCompression()
Initializes the compression after the shared stuff has been initialized.
|
protected abstract void |
initAfterCompression(java.lang.String cellCodecClsName)
Initializes the compression after the shared stuff has been initialized.
|
protected abstract java.lang.String |
initReader(FSDataInputStream stream)
Initializes the log reader with a particular stream (may be null).
|
WAL.Entry |
next() |
WAL.Entry |
next(WAL.Entry reuse) |
protected abstract boolean |
readNext(WAL.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, waitgetPosition, resetprotected Configuration conf
protected FileSystem fs
protected Path path
protected long edit
protected long fileLength
protected CompressionContext compressionContext
protected boolean emptyCompressionContext
public void init(FileSystem fs,
Path path,
Configuration conf,
FSDataInputStream stream)
throws java.io.IOException
init in interface DefaultWALProvider.Readerfs - File system.path - Path.conf - Configuration.stream - Input stream that may have been pre-opened by the caller; may be null.java.io.IOExceptionpublic WAL.Entry next() throws java.io.IOException
next in interface WAL.Readerjava.io.IOExceptionpublic WAL.Entry next(WAL.Entry reuse) throws java.io.IOException
next in interface WAL.Readerjava.io.IOExceptionpublic void seek(long pos)
throws java.io.IOException
seek in interface WAL.Readerjava.io.IOExceptionprotected abstract java.lang.String initReader(FSDataInputStream stream)
throws java.io.IOException
java.io.IOExceptionprotected abstract void initAfterCompression()
throws java.io.IOException
java.io.IOExceptionprotected abstract void initAfterCompression(java.lang.String cellCodecClsName)
throws java.io.IOException
cellCodecClsName - class name of cell Codecjava.io.IOExceptionprotected abstract boolean hasCompression()
protected abstract boolean hasTagCompression()
protected abstract boolean readNext(WAL.Entry e) throws java.io.IOException
e - The entry to read into.java.io.IOExceptionprotected abstract void seekOnFs(long pos)
throws java.io.IOException
java.io.IOException