@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix"}) public abstract class ReaderBase extends Object implements DefaultWALProvider.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 |
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, wait
getPosition, reset
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 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 DefaultWALProvider.Reader
fs
- File system.path
- Path.conf
- Configuration.stream
- Input stream that may have been pre-opened by the caller; may be null.IOException
public WAL.Entry next() throws IOException
next
in interface WAL.Reader
IOException
public WAL.Entry next(WAL.Entry reuse) throws IOException
next
in interface WAL.Reader
IOException
public void seek(long pos) throws IOException
seek
in interface WAL.Reader
IOException
protected abstract String initReader(org.apache.hadoop.fs.FSDataInputStream stream) throws IOException
IOException
protected abstract void initAfterCompression() throws IOException
IOException
protected abstract void initAfterCompression(String cellCodecClsName) throws IOException
cellCodecClsName
- class name of cell CodecIOException
protected abstract boolean hasCompression()
protected abstract boolean hasTagCompression()
protected abstract boolean readNext(WAL.Entry e) throws IOException
e
- The entry to read into.IOException
protected abstract void seekOnFs(long pos) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.