@InterfaceAudience.LimitedPrivate(value="Phoenix") @InterfaceStability.Evolving public class StoreFileReader extends Object
限定符和类型 | 字段和说明 |
---|---|
protected BloomType |
bloomFilterType |
protected BloomFilter |
deleteFamilyBloomFilter |
protected BloomFilter |
generalBloomFilter |
protected long |
sequenceID |
protected TimeRange |
timeRange |
构造器和说明 |
---|
StoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
CacheConfig cacheConf,
boolean primaryReplicaStoreFile,
AtomicInteger refCount,
boolean shared,
org.apache.hadoop.conf.Configuration conf) |
StoreFileReader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
FSDataInputStreamWrapper in,
long size,
CacheConfig cacheConf,
boolean primaryReplicaStoreFile,
AtomicInteger refCount,
boolean shared,
org.apache.hadoop.conf.Configuration conf) |
限定符和类型 | 方法和说明 |
---|---|
void |
close(boolean evictOnClose) |
BloomType |
getBloomFilterType() |
CellComparator |
getComparator() |
long |
getDeleteFamilyCnt() |
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() |
int |
getHFileMinorVersion() |
HFile.Reader |
getHFileReader() |
int |
getHFileVersion() |
Optional<Cell> |
getLastKey() |
Optional<byte[]> |
getLastRowKey() |
long |
getMaxTimestamp() |
int |
getPrefixLength() |
HFileScanner |
getScanner(boolean cacheBlocks,
boolean pread)
已过时。
since 2.0.0 and will be removed in 3.0.0. 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.
|
HFileScanner |
getScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction)
已过时。
since 2.0.0 and will be removed in 3.0.0. 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.
|
long |
getSequenceID() |
StoreFileScanner |
getStoreFileScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction,
long readPt,
long scannerOrder,
boolean canOptimizeForNonNullColumn)
Get a scanner to scan over this StoreFile.
|
long |
getTotalBloomSize() |
long |
getTotalUncompressedBytes() |
long |
indexSize() |
boolean |
isBulkLoaded() |
boolean |
isPrimaryReplicaReader() |
long |
length() |
void |
loadBloomfilter() |
void |
loadBloomfilter(BlockType blockType) |
Map<byte[],byte[]> |
loadFileInfo() |
Optional<Cell> |
midKey() |
boolean |
passesDeleteFamilyBloomFilter(byte[] row,
int rowOffset,
int rowLen) |
boolean |
passesGeneralRowColBloomFilter(Cell cell)
A method for checking Bloom filters.
|
boolean |
passesKeyRangeFilter(Scan scan)
Checks whether the given scan rowkey range overlaps with the current storefile's
|
void |
setBulkLoaded(boolean bulkLoadResult) |
void |
setDeleteFamilyBloomFilterFaulty() |
void |
setGeneralBloomFilterFaulty() |
void |
setSequenceID(long sequenceID) |
protected BloomFilter generalBloomFilter
protected BloomFilter deleteFamilyBloomFilter
protected BloomType bloomFilterType
protected long sequenceID
protected TimeRange timeRange
public StoreFileReader(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, CacheConfig cacheConf, boolean primaryReplicaStoreFile, AtomicInteger refCount, boolean shared, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public StoreFileReader(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, FSDataInputStreamWrapper in, long size, CacheConfig cacheConf, boolean primaryReplicaStoreFile, AtomicInteger refCount, boolean shared, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
public boolean isPrimaryReplicaReader()
public CellComparator getComparator()
public StoreFileScanner getStoreFileScanner(boolean cacheBlocks, boolean pread, boolean isCompaction, long readPt, long scannerOrder, boolean canOptimizeForNonNullColumn)
cacheBlocks
- should this scanner cache blocks?pread
- use pread (for highly concurrent small readers)isCompaction
- is scanner being used for compaction?scannerOrder
- Order of this scanner relative to other scanners. See
KeyValueScanner.getScannerOrder()
.canOptimizeForNonNullColumn
- true
if we can make sure there is no null column,
otherwise false
. This is a hint for optimization.@Deprecated public HFileScanner getScanner(boolean cacheBlocks, boolean pread)
cacheBlocks
- should we cache the blocks?pread
- use pread (for concurrent small readers)@Deprecated public HFileScanner getScanner(boolean cacheBlocks, boolean pread, boolean isCompaction)
cacheBlocks
- should we cache the blocks?pread
- use pread (for concurrent small readers)isCompaction
- is scanner being used for compaction?public void close(boolean evictOnClose) throws IOException
IOException
public boolean passesDeleteFamilyBloomFilter(byte[] row, int rowOffset, int rowLen)
public boolean passesGeneralRowColBloomFilter(Cell cell)
cell
- the cell to check if present in BloomFilterpublic boolean passesKeyRangeFilter(Scan scan)
scan
- the scan specification. Used to determine the rowkey range.public Map<byte[],byte[]> loadFileInfo() throws IOException
IOException
public void loadBloomfilter()
public void loadBloomfilter(BlockType blockType)
public long getFilterEntries()
public void setGeneralBloomFilterFaulty()
public void setDeleteFamilyBloomFilterFaulty()
public Optional<byte[]> getLastRowKey()
public Optional<Cell> midKey() throws IOException
IOException
public long length()
public long getTotalUncompressedBytes()
public long getEntries()
public long getDeleteFamilyCnt()
public long indexSize()
public BloomType getBloomFilterType()
public long getSequenceID()
public void setSequenceID(long sequenceID)
public void setBulkLoaded(boolean bulkLoadResult)
public boolean isBulkLoaded()
public long getTotalBloomSize()
public int getHFileVersion()
public int getHFileMinorVersion()
public HFile.Reader getHFileReader()
public long getMaxTimestamp()
public int getPrefixLength()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.