@InterfaceAudience.Private public class HalfStoreFileReader extends StoreFileReader
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.
StoreFileReader.Listener| 限定符和类型 | 字段和说明 |
|---|---|
protected Cell |
splitCell |
protected byte[] |
splitkey |
bloomFilterType, deleteFamilyBloomFilter, generalBloomFilter, sequenceID, timeRange| 构造器和说明 |
|---|
HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
CacheConfig cacheConf,
Reference r,
boolean isPrimaryReplicaStoreFile,
AtomicInteger refCount,
boolean shared,
org.apache.hadoop.conf.Configuration conf)
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,
boolean isPrimaryReplicaStoreFile,
AtomicInteger refCount,
boolean shared,
org.apache.hadoop.conf.Configuration conf)
Creates a half file reader for a hfile referred to by an hfilelink.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
Optional<Cell> |
getFirstKey() |
Optional<Cell> |
getLastKey() |
HFileScanner |
getScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction) |
protected boolean |
isTop() |
Optional<Cell> |
midKey() |
boolean |
passesKeyRangeFilter(Scan scan)
Checks whether the given scan rowkey range overlaps with the current storefile's
|
close, getBloomFilterType, getComparator, getDeleteFamilyCnt, getHFileMinorVersion, getHFileReader, getHFileVersion, getLastRowKey, getMaxTimestamp, getScanner, getSequenceID, getStoreFileScanner, getTotalBloomSize, getTotalUncompressedBytes, indexSize, isBulkLoaded, isPrimaryReplicaReader, length, loadBloomfilter, loadBloomfilter, loadFileInfo, passesDeleteFamilyBloomFilter, passesGeneralRowBloomFilter, passesGeneralRowColBloomFilter, setBulkLoaded, setDeleteFamilyBloomFilterFaulty, setGeneralBloomFilterFaulty, setListener, setSequenceIDprotected final byte[] splitkey
protected final Cell splitCell
public HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
CacheConfig cacheConf,
Reference r,
boolean isPrimaryReplicaStoreFile,
AtomicInteger refCount,
boolean shared,
org.apache.hadoop.conf.Configuration conf)
throws IOException
fs - fileystem to read fromp - path to hfilecacheConf - r - original reference file (contains top or bottom)conf - ConfigurationIOExceptionpublic HalfStoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path p,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
Reference r,
boolean isPrimaryReplicaStoreFile,
AtomicInteger refCount,
boolean shared,
org.apache.hadoop.conf.Configuration conf)
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)conf - ConfigurationIOExceptionprotected boolean isTop()
public HFileScanner getScanner(boolean cacheBlocks, boolean pread, boolean isCompaction)
getScanner 在类中 StoreFileReadercacheBlocks - should we cache the blocks?pread - use pread (for concurrent small readers)isCompaction - is scanner being used for compaction?public boolean passesKeyRangeFilter(Scan scan)
StoreFileReaderpassesKeyRangeFilter 在类中 StoreFileReaderscan - the scan specification. Used to determine the rowkey range.public Optional<Cell> getLastKey()
getLastKey 在类中 StoreFileReaderpublic Optional<Cell> midKey() throws IOException
midKey 在类中 StoreFileReaderIOExceptionpublic Optional<Cell> getFirstKey()
getFirstKey 在类中 StoreFileReaderpublic long getEntries()
getEntries 在类中 StoreFileReaderpublic long getFilterEntries()
StoreFileReadergetFilterEntries 在类中 StoreFileReaderCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.