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

All Superinterfaces:
Closeable, HFile.CachingBlockReader
All Known Implementing Classes:
AbstractHFileReader, HFileReaderV1, HFileReaderV2
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
 DataInput getBloomFilterMetadata()
          Retrieves Bloom filter metadata as appropriate for each HFile version.
 String getColumnFamilyName()
           
 org.apache.hadoop.io.RawComparator<byte[]> getComparator()
           
 Compression.Algorithm getCompressionAlgorithm()
           
 HFileBlockIndex.BlockIndexReader getDataBlockIndexReader()
           
 long getEntries()
           
 byte[] getFirstKey()
           
 byte[] getFirstRowKey()
           
 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()
           
 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.


getColumnFamilyName

String getColumnFamilyName()

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()

getBloomFilterMetadata

DataInput getBloomFilterMetadata()
                                 throws IOException
Retrieves 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


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