org.apache.hadoop.hbase.io
Class HalfStoreFileReader
java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreFile.Reader
org.apache.hadoop.hbase.io.HalfStoreFileReader
public class HalfStoreFileReader
- extends StoreFile.Reader
A facade for a HFile.Reader
that serves up
either the top or bottom half of a HFile where 'bottom' is the first half
of the file containing the keys that sort lowest and 'top' is the second half
of the file with keys that sort greater than those of the bottom half.
The top includes the split files midkey, of the key that follows if it does
not exist in the file.
This type works in tandem with the Reference
type. This class
is used reading while Reference is used writing.
This file is not splitable. Calls to midkey()
return null.
Methods inherited from class org.apache.hadoop.hbase.regionserver.StoreFile.Reader |
close, getBloomFilterType, getComparator, getEntries, getFilterEntries, getFirstKey, getMetaBlock, getSequenceID, getStoreFileScanner, indexSize, length, loadBloomfilter, loadFileInfo, setBloomFilterFaulty, setSequenceID, shouldSeek |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
splitkey
protected final byte[] splitkey
HalfStoreFileReader
public HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
BlockCache c,
Reference r)
throws IOException
- Parameters:
fs
- p
- c
- r
-
- Throws:
IOException
isTop
protected boolean isTop()
getScanner
public HFileScanner getScanner(boolean cacheBlocks,
boolean pread)
- Description copied from class:
StoreFile.Reader
- 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.
- Overrides:
getScanner
in class StoreFile.Reader
- Parameters:
cacheBlocks
- should we cache the blocks?pread
- use pread (for concurrent small readers)
- Returns:
- the underlying HFileScanner
getLastKey
public byte[] getLastKey()
- Overrides:
getLastKey
in class StoreFile.Reader
midkey
public byte[] midkey()
throws IOException
- Overrides:
midkey
in class StoreFile.Reader
- Throws:
IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.