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

All Superinterfaces:
Closeable, HFile.CachingBlockReader, SchemaMetrics.SchemaAware
All Known Implementing Classes:
AbstractHFileReader, HFileReaderV1, HFileReaderV2
Enclosing class:
HFile

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

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


Method Summary
 void close(boolean evictOnClose)
          Close method with optional evictOnClose
 String getColumnFamilyName()
           
 org.apache.hadoop.io.RawComparator<byte[]> getComparator()
           
 Compression.Algorithm getCompressionAlgorithm()
           
 HFileBlockIndex.BlockIndexReader getDataBlockIndexReader()
           
 DataInput getDeleteBloomFilterMetadata()
          Retrieves delete family Bloom filter metadata as appropriate for each HFile version.
 DataBlockEncoding getEncodingOnDisk()
           
 long getEntries()
           
 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
 
Methods inherited from interface org.apache.hadoop.hbase.regionserver.metrics.SchemaMetrics.SchemaAware
getSchemaMetrics, getTableName
 

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.


getColumnFamilyName

String getColumnFamilyName()
Specified by:
getColumnFamilyName in interface SchemaMetrics.SchemaAware

getComparator

org.apache.hadoop.io.RawComparator<byte[]> 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

getEncodingOnDisk

DataBlockEncoding getEncodingOnDisk()

hasMVCCInfo

boolean hasMVCCInfo()


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.