@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"})
public abstract class ReaderBase
extends Object
implements AbstractFSWALProvider.Reader
| Modifier and Type | Field and Description |
|---|---|
protected 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 |
private static org.slf4j.Logger |
LOG |
protected org.apache.hadoop.fs.Path |
path |
| Constructor and Description |
|---|
ReaderBase()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
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, resetprivate static final org.slf4j.Logger LOG
protected 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 CompressionContext compressionContext
protected boolean emptyCompressionContext
public ReaderBase()
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 AbstractFSWALProvider.Readerfs - File system.path - Path.conf - Configuration.stream - Input stream that may have been pre-opened by the caller; may be null.IOExceptionpublic WAL.Entry next() throws IOException
next in interface WAL.ReaderIOExceptionpublic WAL.Entry next(WAL.Entry reuse) throws IOException
next in interface WAL.ReaderIOExceptionpublic void seek(long pos) throws IOException
seek in interface WAL.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(WAL.Entry e) throws IOException
e - The entry to read into.IOExceptionprotected abstract void seekOnFs(long pos) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.