org.apache.hadoop.hbase.regionserver.wal
Class SequenceFileLogReader

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.wal.ReaderBase
      extended by org.apache.hadoop.hbase.regionserver.wal.SequenceFileLogReader
All Implemented Interfaces:
HLog.Reader

@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix","Configuration"})
public class SequenceFileLogReader
extends ReaderBase


Field Summary
protected  org.apache.hadoop.io.SequenceFile.Reader reader
           
 
Fields inherited from class org.apache.hadoop.hbase.regionserver.wal.ReaderBase
compressionContext, conf, edit, emptyCompressionContext, fileLength, fs, path, trailer, trailerWarnSize
 
Constructor Summary
SequenceFileLogReader()
           
 
Method Summary
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).
protected  boolean readNext(HLog.Entry e)
          Read next entry.
 void reset()
           
protected  void seekOnFs(long pos)
          Performs a filesystem-level seek to a certain position in an underlying file.
 
Methods inherited from class org.apache.hadoop.hbase.regionserver.wal.ReaderBase
getWALTrailer, init, next, next, seek
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected org.apache.hadoop.io.SequenceFile.Reader reader
Constructor Detail

SequenceFileLogReader

public SequenceFileLogReader()
Method Detail

close

public void close()
           throws IOException
Throws:
IOException

getPosition

public long getPosition()
                 throws IOException
Throws:
IOException

reset

public void reset()
           throws IOException
Throws:
IOException

initReader

protected String initReader(org.apache.hadoop.fs.FSDataInputStream stream)
                     throws IOException
Description copied from class: ReaderBase
Initializes the log reader with a particular stream (may be null). Reader assumes ownership of the stream if not null and may use it. Called once.

Specified by:
initReader in class ReaderBase
Returns:
the class name of cell Codec, null if such information is not available
Throws:
IOException

initAfterCompression

protected void initAfterCompression(String cellCodecClsName)
                             throws IOException
Description copied from class: ReaderBase
Initializes the compression after the shared stuff has been initialized. Called once.

Specified by:
initAfterCompression in class ReaderBase
Parameters:
cellCodecClsName - class name of cell Codec
Throws:
IOException

initAfterCompression

protected void initAfterCompression()
                             throws IOException
Description copied from class: ReaderBase
Initializes the compression after the shared stuff has been initialized. Called once.

Specified by:
initAfterCompression in class ReaderBase
Throws:
IOException

hasCompression

protected boolean hasCompression()
Specified by:
hasCompression in class ReaderBase
Returns:
Whether compression is enabled for this log.

hasTagCompression

protected boolean hasTagCompression()
Specified by:
hasTagCompression in class ReaderBase
Returns:
Whether tag compression is enabled for this log.

readNext

protected boolean readNext(HLog.Entry e)
                    throws IOException
Description copied from class: ReaderBase
Read next entry.

Specified by:
readNext in class ReaderBase
Parameters:
e - The entry to read into.
Returns:
Whether there was anything to read.
Throws:
IOException

seekOnFs

protected void seekOnFs(long pos)
                 throws IOException
Description copied from class: ReaderBase
Performs a filesystem-level seek to a certain position in an underlying file.

Specified by:
seekOnFs in class ReaderBase
Throws:
IOException

addFileInfoToException

protected IOException addFileInfoToException(IOException ioe)
                                      throws IOException
Throws:
IOException


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.