@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix","Configuration"}) public class SequenceFileLogReader extends ReaderBase
Modifier and Type | Class and Description |
---|---|
private static class |
SequenceFileLogReader.WALReader
Hack just to set the correct file length up in SequenceFile.Reader.
|
Modifier and Type | Field and Description |
---|---|
private static int |
COMPRESSION_VERSION |
private static org.apache.hadoop.io.Text |
DICTIONARY_COMPRESSION_TYPE |
(package private) long |
entryStart |
private static org.apache.commons.logging.Log |
LOG |
protected org.apache.hadoop.io.SequenceFile.Reader |
reader |
private static org.apache.hadoop.io.Text |
WAL_COMPRESSION_TYPE_KEY |
private static org.apache.hadoop.io.Text |
WAL_VERSION_KEY |
compressionContext, conf, edit, emptyCompressionContext, fileLength, fs, path
Constructor and Description |
---|
SequenceFileLogReader() |
Modifier and Type | Method and Description |
---|---|
protected IOException |
addFileInfoToException(IOException ioe) |
void |
close() |
long |
getPosition() |
protected boolean |
hasCompression() |
protected boolean |
hasTagCompression() |
protected void |
initAfterCompression()
Initializes the compression after the shared stuff has been initialized.
|
protected void |
initAfterCompression(String cellCodecClsName)
Initializes the compression after the shared stuff has been initialized.
|
protected String |
initReader(org.apache.hadoop.fs.FSDataInputStream stream)
Initializes the log reader with a particular stream (may be null).
|
(package private) static boolean |
isWALCompressionEnabled(org.apache.hadoop.io.SequenceFile.Metadata metadata)
Call this method after init() has been executed
|
protected boolean |
readNext(WAL.Entry e)
fill in the passed entry with teh next key/value.
|
void |
reset() |
protected void |
seekOnFs(long pos)
Performs a filesystem-level seek to a certain position in an underlying file.
|
init, next, next, seek
private static final org.apache.commons.logging.Log LOG
private static final org.apache.hadoop.io.Text WAL_VERSION_KEY
private static final int COMPRESSION_VERSION
private static final org.apache.hadoop.io.Text WAL_COMPRESSION_TYPE_KEY
private static final org.apache.hadoop.io.Text DICTIONARY_COMPRESSION_TYPE
protected org.apache.hadoop.io.SequenceFile.Reader reader
long entryStart
public void close() throws IOException
IOException
public long getPosition() throws IOException
IOException
public void reset() throws IOException
IOException
protected String initReader(org.apache.hadoop.fs.FSDataInputStream stream) throws IOException
ReaderBase
initReader
in class ReaderBase
IOException
protected void initAfterCompression(String cellCodecClsName) throws IOException
ReaderBase
initAfterCompression
in class ReaderBase
cellCodecClsName
- class name of cell CodecIOException
protected void initAfterCompression() throws IOException
ReaderBase
initAfterCompression
in class ReaderBase
IOException
protected boolean hasCompression()
hasCompression
in class ReaderBase
protected boolean hasTagCompression()
hasTagCompression
in class ReaderBase
static boolean isWALCompressionEnabled(org.apache.hadoop.io.SequenceFile.Metadata metadata)
protected boolean readNext(WAL.Entry e) throws IOException
HLogKey
for the key.readNext
in class ReaderBase
e
- The entry to read into.IOException
protected void seekOnFs(long pos) throws IOException
ReaderBase
seekOnFs
in class ReaderBase
IOException
protected IOException addFileInfoToException(IOException ioe) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.