|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.util.BloomFilterFactory
public final class BloomFilterFactory
Handles Bloom filter initialization based on configuration and serialized
metadata in the reader and writer of StoreFile
.
Field Summary | |
---|---|
static String |
IO_STOREFILE_BLOOM_BLOCK_SIZE
Target Bloom block size. |
static String |
IO_STOREFILE_BLOOM_ENABLED
Master switch to enable Bloom filters |
static String |
IO_STOREFILE_BLOOM_ERROR_RATE
Specifies the target error rate to use when selecting the number of keys per Bloom filter. |
static String |
IO_STOREFILE_BLOOM_MAX_FOLD
Maximum folding factor allowed. |
static String |
IO_STOREFILE_BLOOM_MAX_KEYS
For default (single-block) Bloom filters this specifies the maximum number of keys. |
static String |
IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED
Master switch to enable Delete Family Bloom filters |
Method Summary | |
---|---|
static BloomFilterWriter |
createDeleteBloomAtWrite(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
int maxKeys,
HFile.Writer writer)
Creates a new Delete Family Bloom filter at the time of StoreFile writing. |
static BloomFilter |
createFromMeta(DataInput meta,
HFile.Reader reader)
Instantiates the correct Bloom filter class based on the version provided in the meta block data. |
static BloomFilterWriter |
createGeneralBloomAtWrite(org.apache.hadoop.conf.Configuration conf,
CacheConfig cacheConf,
StoreFile.BloomType bloomType,
int maxKeys,
HFile.Writer writer)
Creates a new general (Row or RowCol) Bloom filter at the time of StoreFile writing. |
static int |
getBloomBlockSize(org.apache.hadoop.conf.Configuration conf)
|
static float |
getErrorRate(org.apache.hadoop.conf.Configuration conf)
|
static int |
getMaxFold(org.apache.hadoop.conf.Configuration conf)
|
static int |
getMaxKeys(org.apache.hadoop.conf.Configuration conf)
|
static boolean |
isDeleteFamilyBloomEnabled(org.apache.hadoop.conf.Configuration conf)
|
static boolean |
isGeneralBloomEnabled(org.apache.hadoop.conf.Configuration conf)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String IO_STOREFILE_BLOOM_ERROR_RATE
public static final String IO_STOREFILE_BLOOM_MAX_FOLD
public static final String IO_STOREFILE_BLOOM_MAX_KEYS
public static final String IO_STOREFILE_BLOOM_ENABLED
public static final String IO_STOREFILE_DELETEFAMILY_BLOOM_ENABLED
public static final String IO_STOREFILE_BLOOM_BLOCK_SIZE
Method Detail |
---|
public static BloomFilter createFromMeta(DataInput meta, HFile.Reader reader) throws IllegalArgumentException, IOException
meta
- the byte array holding the Bloom filter's metadata, including
version informationreader
- the HFile
reader to use to lazily load Bloom filter
blocks
IllegalArgumentException
IOException
public static boolean isGeneralBloomEnabled(org.apache.hadoop.conf.Configuration conf)
public static boolean isDeleteFamilyBloomEnabled(org.apache.hadoop.conf.Configuration conf)
public static float getErrorRate(org.apache.hadoop.conf.Configuration conf)
public static int getMaxFold(org.apache.hadoop.conf.Configuration conf)
public static int getBloomBlockSize(org.apache.hadoop.conf.Configuration conf)
public static int getMaxKeys(org.apache.hadoop.conf.Configuration conf)
public static BloomFilterWriter createGeneralBloomAtWrite(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, StoreFile.BloomType bloomType, int maxKeys, HFile.Writer writer)
StoreFile
writing.
conf
- cacheConf
- bloomType
- maxKeys
- an estimate of the number of keys we expect to insert.
Irrelevant if compound Bloom filters are enabled.writer
- the HFile writer
public static BloomFilterWriter createDeleteBloomAtWrite(org.apache.hadoop.conf.Configuration conf, CacheConfig cacheConf, int maxKeys, HFile.Writer writer)
StoreFile
writing.
conf
- cacheConf
- maxKeys
- an estimate of the number of keys we expect to insert.
Irrelevant if compound Bloom filters are enabled.writer
- the HFile writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |