Package org.apache.hadoop.hbase.io
Class HalfStoreFileReader
java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreFileReader
org.apache.hadoop.hbase.io.HalfStoreFileReader
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.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate booleanprivate static final org.slf4j.Loggerprivate final Cellprotected final byte[](package private) final booleanFields inherited from class org.apache.hadoop.hbase.regionserver.StoreFileReaderbloomFilterType, conf, deleteFamilyBloomFilter, generalBloomFilter, sequenceID, timeRange
- 
Constructor SummaryConstructorsConstructorDescriptionHalfStoreFileReader(ReaderContext context, HFileInfo fileInfo, CacheConfig cacheConf, Reference r, StoreFileInfo storeFileInfo, org.apache.hadoop.conf.Configuration conf) Creates a half file reader for a hfile referred to by an hfilelink.
- 
Method SummaryModifier and TypeMethodDescriptionlonglongThe number of Bloom filter entries in this store file, or an estimate thereof, if the Bloom filter is not loaded.getScanner(boolean cacheBlocks, boolean pread, boolean isCompaction) protected booleanisTop()midKey()booleanpassesKeyRangeFilter(Scan scan) Checks whether the given scan rowkey range overlaps with the current storefile'sMethods inherited from class org.apache.hadoop.hbase.regionserver.StoreFileReaderclose, getBloomFilterType, getComparator, getDeleteFamilyCnt, getHFileMinorVersion, getHFileReader, getHFileVersion, getLastRowKey, getMaxTimestamp, getPrefixLength, getReaderContext, getScanner, getSequenceID, getStoreFileScanner, getTotalBloomSize, getTotalUncompressedBytes, indexSize, isBulkLoaded, isPrimaryReplicaReader, length, loadBloomfilter, loadFileInfo, passesDeleteFamilyBloomFilter, passesGeneralRowColBloomFilter, setBulkLoaded, setSequenceID
- 
Field Details- 
LOG
- 
top
- 
splitkey
- 
splitCell
- 
firstKey
- 
firstKeySeeked
 
- 
- 
Constructor Details- 
HalfStoreFileReaderpublic HalfStoreFileReader(ReaderContext context, HFileInfo fileInfo, CacheConfig cacheConf, Reference r, StoreFileInfo storeFileInfo, org.apache.hadoop.conf.Configuration conf) throws IOException Creates a half file reader for a hfile referred to by an hfilelink.- Parameters:
- context- Reader context info
- fileInfo- HFile info
- cacheConf- CacheConfig
- r- original reference file (contains top or bottom)
- conf- Configuration
- Throws:
- IOException
 
 
- 
- 
Method Details- 
isTop
- 
getScanner- Overrides:
- getScannerin class- StoreFileReader
- Returns:
- the underlying HFileScanner
- See Also:
 
- 
passesKeyRangeFilterDescription copied from class:StoreFileReaderChecks whether the given scan rowkey range overlaps with the current storefile's- Overrides:
- passesKeyRangeFilterin class- StoreFileReader
- Parameters:
- scan- the scan specification. Used to determine the rowkey range.
- Returns:
- true if there is overlap, false otherwise
 
- 
getLastKey- Overrides:
- getLastKeyin class- StoreFileReader
 
- 
midKey- Overrides:
- midKeyin class- StoreFileReader
- Throws:
- IOException
 
- 
getFirstKey- Overrides:
- getFirstKeyin class- StoreFileReader
 
- 
getEntries- Overrides:
- getEntriesin class- StoreFileReader
 
- 
getFilterEntriesDescription copied from class:StoreFileReaderThe number of Bloom filter entries in this store file, or an estimate thereof, if the Bloom filter is not loaded. This always returns an upper bound of the number of Bloom filter entries.- Overrides:
- getFilterEntriesin class- StoreFileReader
- Returns:
- an estimate of the number of Bloom filter entries in this file
 
 
-