org.apache.hadoop.hbase.io.hfile
Interface HFile.Reader

All Superinterfaces:
Closeable, HFile.CachingBlockReader
All Known Implementing Classes:
AbstractHFileReader, HFileReaderV2, HFileReaderV3
Enclosing class:
HFile

public static interface HFile.Reader
extends Closeable, HFile.CachingBlockReader

An interface used by clients to open and iterate an HFile.


Method Summary
 void close(boolean evictOnClose)
          Close method with optional evictOnClose
 KeyValue.KVComparator getComparator()
           
 Compression.Algorithm getCompressionAlgorithm()
           
 DataBlockEncoding getDataBlockEncoding()
           
 HFileBlockIndex.BlockIndexReader getDataBlockIndexReader()
           
 DataInput getDeleteBloomFilterMetadata()
          Retrieves delete family Bloom filter metadata as appropriate for each HFile version.
 long getEntries()
           
 HFileContext getFileContext()
          Return the file context of the HFile this reader belongs to
 byte[] getFirstKey()
           
 byte[] getFirstRowKey()
           
 DataInput getGeneralBloomFilterMetadata()
          Retrieves general Bloom filter metadata as appropriate for each HFile version.
 byte[] getLastKey()
           
 byte[] getLastRowKey()
           
 ByteBuffer getMetaBlock(String metaBlockName, boolean cacheBlock)
           
 String getName()
          Returns this reader's "name".
 org.apache.hadoop.fs.Path getPath()
           
 HFileScanner getScanner(boolean cacheBlocks, boolean pread)
           
 HFileScanner getScanner(boolean cacheBlocks, boolean pread, boolean isCompaction)
           
 FixedFileTrailer getTrailer()
           
 boolean hasMVCCInfo()
           
 long indexSize()
           
 long length()
           
 Map<byte[],byte[]> loadFileInfo()
           
 byte[] midkey()
           
 
Methods inherited from interface java.io.Closeable
close
 
Methods inherited from interface org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
readBlock
 

Method Detail

getName

String getName()
Returns this reader's "name". Usually the last component of the path. Needs to be constant as the file is being moved to support caching on write.


getComparator

KeyValue.KVComparator getComparator()

getScanner

HFileScanner getScanner(boolean cacheBlocks,
                        boolean pread,
                        boolean isCompaction)

getMetaBlock

ByteBuffer getMetaBlock(String metaBlockName,
                        boolean cacheBlock)
                        throws IOException
Throws:
IOException

loadFileInfo

Map<byte[],byte[]> loadFileInfo()
                                throws IOException
Throws:
IOException

getLastKey

byte[] getLastKey()

midkey

byte[] midkey()
              throws IOException
Throws:
IOException

length

long length()

getEntries

long getEntries()

getFirstKey

byte[] getFirstKey()

indexSize

long indexSize()

getFirstRowKey

byte[] getFirstRowKey()

getLastRowKey

byte[] getLastRowKey()

getTrailer

FixedFileTrailer getTrailer()

getDataBlockIndexReader

HFileBlockIndex.BlockIndexReader getDataBlockIndexReader()

getScanner

HFileScanner getScanner(boolean cacheBlocks,
                        boolean pread)

getCompressionAlgorithm

Compression.Algorithm getCompressionAlgorithm()

getGeneralBloomFilterMetadata

DataInput getGeneralBloomFilterMetadata()
                                        throws IOException
Retrieves general Bloom filter metadata as appropriate for each HFile version. Knows nothing about how that metadata is structured.

Throws:
IOException

getDeleteBloomFilterMetadata

DataInput getDeleteBloomFilterMetadata()
                                       throws IOException
Retrieves delete family Bloom filter metadata as appropriate for each HFile version. Knows nothing about how that metadata is structured.

Throws:
IOException

getPath

org.apache.hadoop.fs.Path getPath()

close

void close(boolean evictOnClose)
           throws IOException
Close method with optional evictOnClose

Throws:
IOException

getDataBlockEncoding

DataBlockEncoding getDataBlockEncoding()

hasMVCCInfo

boolean hasMVCCInfo()

getFileContext

HFileContext getFileContext()
Return the file context of the HFile this reader belongs to



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