|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.regionserver.StoreFile.Reader
org.apache.hadoop.hbase.io.HalfStoreFileReader
@InterfaceAudience.Private public class 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 Summary | |
|---|---|
protected byte[] |
splitkey
|
| Fields inherited from class org.apache.hadoop.hbase.regionserver.StoreFile.Reader |
|---|
bloomFilterType, deleteFamilyBloomFilter, generalBloomFilter, sequenceID, timeRangeTracker |
| Constructor Summary | |
|---|---|
HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
CacheConfig cacheConf,
Reference r,
DataBlockEncoding preferredEncodingInCache)
Creates a half file reader for a normal hfile. |
|
HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r,
DataBlockEncoding preferredEncodingInCache)
Creates a half file reader for a hfile referred to by an hfilelink. |
|
| Method Summary | |
|---|---|
long |
getEntries()
|
long |
getFilterEntries()
The number of Bloom filter entries in this store file, or an estimate thereof, if the Bloom filter is not loaded. |
byte[] |
getFirstKey()
|
byte[] |
getLastKey()
|
HFileScanner |
getScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction)
Warning: Do not write further code which depends on this call. |
protected boolean |
isTop()
|
byte[] |
midkey()
|
| Methods inherited from class org.apache.hadoop.hbase.regionserver.StoreFile.Reader |
|---|
close, getBloomFilterType, getComparator, getDeleteFamilyCnt, getHFileMinorVersion, getHFileReader, getHFileVersion, getMaxTimestamp, getScanner, getSequenceID, getStoreFileScanner, getStoreFileScanner, getTotalBloomSize, getTotalUncompressedBytes, indexSize, length, loadBloomfilter, loadFileInfo, passesDeleteFamilyBloomFilter, passesGeneralBloomFilter, setDeleteFamilyBloomFilterFaulty, setGeneralBloomFilterFaulty, setSequenceID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final byte[] splitkey
| Constructor Detail |
|---|
public HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
CacheConfig cacheConf,
Reference r,
DataBlockEncoding preferredEncodingInCache)
throws IOException
fs - fileystem to read fromp - path to hfilecacheConf - r - original reference file (contains top or bottom)preferredEncodingInCache -
IOException
public HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r,
DataBlockEncoding preferredEncodingInCache)
throws IOException
fs - fileystem to read fromp - path to hfilein - FSDataInputStreamWrappersize - Full size of the hfile filecacheConf - r - original reference file (contains top or bottom)preferredEncodingInCache -
IOException| Method Detail |
|---|
protected boolean isTop()
public HFileScanner getScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction)
StoreFile.Reader
getScanner in class StoreFile.ReadercacheBlocks - should we cache the blocks?pread - use pread (for concurrent small readers)isCompaction - is scanner being used for compaction?
public byte[] getLastKey()
getLastKey in class StoreFile.Reader
public byte[] midkey()
throws IOException
midkey in class StoreFile.ReaderIOExceptionpublic byte[] getFirstKey()
getFirstKey in class StoreFile.Readerpublic long getEntries()
getEntries in class StoreFile.Readerpublic long getFilterEntries()
StoreFile.Reader
getFilterEntries in class StoreFile.Reader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||