org.apache.hadoop.hbase.regionserver
Class StoreFile.Reader

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.StoreFile.Reader
Direct Known Subclasses:
HalfStoreFileReader
Enclosing class:
StoreFile

public static class StoreFile.Reader
extends Object

Reader for a StoreFile.


Field Summary
protected  BloomFilter bloomFilter
           
protected  StoreFile.BloomType bloomFilterType
           
protected  long sequenceID
           
protected  TimeRangeTracker timeRangeTracker
           
 
Constructor Summary
StoreFile.Reader(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, BlockCache blockCache, boolean inMemory)
           
 
Method Summary
 void close()
           
 StoreFile.BloomType getBloomFilterType()
           
 org.apache.hadoop.io.RawComparator<byte[]> getComparator()
           
 int getEntries()
           
 int getFilterEntries()
           
 byte[] getFirstKey()
           
 byte[] getLastKey()
           
 ByteBuffer getMetaBlock(String bloomFilterDataKey, boolean cacheBlock)
           
 HFileScanner getScanner(boolean cacheBlocks, boolean pread)
          Deprecated. 
 long getSequenceID()
           
 org.apache.hadoop.hbase.regionserver.StoreFileScanner getStoreFileScanner(boolean cacheBlocks, boolean pread)
          Get a scanner to scan over this StoreFile.
 long indexSize()
           
 long length()
           
 void loadBloomfilter()
           
 Map<byte[],byte[]> loadFileInfo()
           
 byte[] midkey()
           
 void setBloomFilterFaulty()
           
 void setSequenceID(long sequenceID)
           
 boolean shouldSeek(Scan scan, SortedSet<byte[]> columns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bloomFilter

protected BloomFilter bloomFilter

bloomFilterType

protected StoreFile.BloomType bloomFilterType

timeRangeTracker

protected TimeRangeTracker timeRangeTracker

sequenceID

protected long sequenceID
Constructor Detail

StoreFile.Reader

public StoreFile.Reader(org.apache.hadoop.fs.FileSystem fs,
                        org.apache.hadoop.fs.Path path,
                        BlockCache blockCache,
                        boolean inMemory)
                 throws IOException
Throws:
IOException
Method Detail

getComparator

public org.apache.hadoop.io.RawComparator<byte[]> getComparator()

getStoreFileScanner

public org.apache.hadoop.hbase.regionserver.StoreFileScanner getStoreFileScanner(boolean cacheBlocks,
                                                                                 boolean pread)
Get a scanner to scan over this StoreFile.

Parameters:
cacheBlocks - should this scanner cache blocks?
pread - use pread (for highly concurrent small readers)
Returns:
a scanner

getScanner

@Deprecated
public HFileScanner getScanner(boolean cacheBlocks,
                                          boolean pread)
Deprecated. 

Warning: Do not write further code which depends on this call. Instead use getStoreFileScanner() which uses the StoreFileScanner class/interface which is the preferred way to scan a store with higher level concepts.

Parameters:
cacheBlocks - should we cache the blocks?
pread - use pread (for concurrent small readers)
Returns:
the underlying HFileScanner

close

public void close()
           throws IOException
Throws:
IOException

shouldSeek

public boolean shouldSeek(Scan scan,
                          SortedSet<byte[]> columns)

loadFileInfo

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

loadBloomfilter

public void loadBloomfilter()

getFilterEntries

public int getFilterEntries()

getMetaBlock

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

setBloomFilterFaulty

public void setBloomFilterFaulty()

getLastKey

public byte[] getLastKey()

midkey

public byte[] midkey()
              throws IOException
Throws:
IOException

length

public long length()

getEntries

public int getEntries()

getFirstKey

public byte[] getFirstKey()

indexSize

public long indexSize()

getBloomFilterType

public StoreFile.BloomType getBloomFilterType()

getSequenceID

public long getSequenceID()

setSequenceID

public void setSequenceID(long sequenceID)


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