@InterfaceAudience.Private public abstract class AbstractHFileReader extends Object implements HFile.Reader, org.apache.hadoop.conf.Configurable
HFile readers.| Modifier and Type | Class and Description | 
|---|---|
| static class  | AbstractHFileReader.BlockIndexNotLoadedException | 
| static class  | AbstractHFileReader.NotSeekedExceptionAn exception thrown when an operation requiring a scanner to be seeked
 is invoked on a scanner that is not seeked. | 
| protected static class  | AbstractHFileReader.Scanner | 
| Modifier and Type | Field and Description | 
|---|---|
| protected int | avgKeyLenAverage key length read from file info | 
| protected int | avgValueLenAverage value length read from file info | 
| protected CacheConfig | cacheConfBlock cache configuration. | 
| protected KeyValue.KVComparator | comparatorKey comparator | 
| protected Compression.Algorithm | compressAlgoFilled when we read in the trailer. | 
| protected org.apache.hadoop.conf.Configuration | conf | 
| protected HFileDataBlockEncoder | dataBlockEncoderWhat kind of data block encoding should be used while reading, writing,
 and handling cache. | 
| protected HFileBlockIndex.BlockIndexReader | dataBlockIndexReaderData block index reader keeping the root data index in memory | 
| protected HFile.FileInfo | fileInfo | 
| protected long | fileSizeSize of this file. | 
| protected HFileSystem | hfsThe filesystem used for accesing data | 
| protected org.apache.hadoop.fs.FSDataInputStream | istreamStream to read from. | 
| protected org.apache.hadoop.fs.FSDataInputStream | istreamNoFsChecksumThe file system stream of the underlying  HFilethat
 does not do checksum verification in the file system | 
| protected byte[] | lastKeyLast key in the file. | 
| protected HFileBlockIndex.BlockIndexReader | metaBlockIndexReaderMeta block index reader -- always single level | 
| protected String | nameFile name to be used for block names | 
| protected org.apache.hadoop.fs.Path | pathPath of file | 
| protected FixedFileTrailer | trailer | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractHFileReader(org.apache.hadoop.fs.Path path,
                   FixedFileTrailer trailer,
                   long fileSize,
                   CacheConfig cacheConf,
                   HFileSystem hfs,
                   org.apache.hadoop.conf.Configuration conf) | 
| Modifier and Type | Method and Description | 
|---|---|
| KeyValue.KVComparator | getComparator() | 
| Compression.Algorithm | getCompressionAlgorithm() | 
| org.apache.hadoop.conf.Configuration | getConf() | 
| DataBlockEncoding | getDataBlockEncoding() | 
| HFileBlockIndex.BlockIndexReader | getDataBlockIndexReader() | 
| long | getEntries() | 
| byte[] | getFirstKey() | 
| byte[] | getFirstRowKey() | 
| byte[] | getLastRowKey() | 
| abstract int | getMajorVersion() | 
| String | getName()Returns this reader's "name". | 
| org.apache.hadoop.fs.Path | getPath() | 
| HFileScanner | getScanner(boolean cacheBlocks,
          boolean pread)Create a Scanner on this file. | 
| FixedFileTrailer | getTrailer() | 
| long | indexSize() | 
| abstract boolean | isFileInfoLoaded() | 
| long | length() | 
| HFile.FileInfo | loadFileInfo() | 
| void | setConf(org.apache.hadoop.conf.Configuration conf) | 
| String | toString() | 
| protected String | toStringFirstKey() | 
| protected String | toStringLastKey() | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclose, getDeleteBloomFilterMetadata, getFileContext, getGeneralBloomFilterMetadata, getLastKey, getMetaBlock, getScanner, hasMVCCInfo, midkeyreadBlockprotected org.apache.hadoop.fs.FSDataInputStream istream
protected org.apache.hadoop.fs.FSDataInputStream istreamNoFsChecksum
HFile that
 does not do checksum verification in the file systemprotected HFileBlockIndex.BlockIndexReader dataBlockIndexReader
protected HFileBlockIndex.BlockIndexReader metaBlockIndexReader
protected final FixedFileTrailer trailer
protected final Compression.Algorithm compressAlgo
protected HFileDataBlockEncoder dataBlockEncoder
protected byte[] lastKey
protected int avgKeyLen
protected int avgValueLen
protected KeyValue.KVComparator comparator
protected final long fileSize
protected final CacheConfig cacheConf
protected final org.apache.hadoop.fs.Path path
protected final String name
protected HFile.FileInfo fileInfo
protected HFileSystem hfs
protected org.apache.hadoop.conf.Configuration conf
protected AbstractHFileReader(org.apache.hadoop.fs.Path path,
                   FixedFileTrailer trailer,
                   long fileSize,
                   CacheConfig cacheConf,
                   HFileSystem hfs,
                   org.apache.hadoop.conf.Configuration conf)
protected String toStringFirstKey()
protected String toStringLastKey()
public abstract boolean isFileInfoLoaded()
public long length()
length in interface HFile.Readerpublic HFileScanner getScanner(boolean cacheBlocks, boolean pread)
HFileScanner.seekTo(byte[]) to position an start the read. There is
 nothing to clean up in a Scanner. Letting go of your references to the
 scanner is sufficient. NOTE: Do not use this overload of getScanner for
 compactions.getScanner in interface HFile.ReadercacheBlocks - True if we should cache blocks read in by this scanner.pread - Use positional read rather than seek+read if true (pread is
          better for random reads, seek+read is better scanning).public byte[] getFirstKey()
getFirstKey in interface HFile.Readerpublic byte[] getFirstRowKey()
HFile version 1: move this to StoreFile after Ryan's
 patch goes in to eliminate KeyValue here.getFirstRowKey in interface HFile.Readerpublic byte[] getLastRowKey()
HFile version 1: move this to StoreFile after
 Ryan's patch goes in to eliminate KeyValue here.getLastRowKey in interface HFile.Readerpublic long getEntries()
getEntries in interface HFile.Readerpublic KeyValue.KVComparator getComparator()
getComparator in interface HFile.Readerpublic Compression.Algorithm getCompressionAlgorithm()
getCompressionAlgorithm in interface HFile.Readerpublic long indexSize()
indexSize in interface HFile.Readerpublic String getName()
HFile.ReadergetName in interface HFile.Readerpublic HFileBlockIndex.BlockIndexReader getDataBlockIndexReader()
getDataBlockIndexReader in interface HFile.Readerpublic FixedFileTrailer getTrailer()
getTrailer in interface HFile.Readerpublic HFile.FileInfo loadFileInfo() throws IOException
loadFileInfo in interface HFile.ReaderIOExceptionpublic org.apache.hadoop.fs.Path getPath()
getPath in interface HFile.Readerpublic DataBlockEncoding getDataBlockEncoding()
getDataBlockEncoding in interface HFile.Readerpublic abstract int getMajorVersion()
public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.ConfigurableCopyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.