|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.BloomFilterDescriptor
@Deprecated public class BloomFilterDescriptor
Supplied as a parameter to HColumnDescriptor to specify what kind of bloom filter to use for a column, and its configuration parameters. There is no way to automatically determine the vector size and the number of hash functions to use. In particular, bloom filters are very sensitive to the number of elements inserted into them. For HBase, the number of entries depends on the size of the data stored in the column. Currently the default region size is 64MB, so the number of entries is approximately 64MB / (average value size for column). If m denotes the number of bits in the Bloom filter (vectorSize), n denotes the number of elements inserted into the Bloom filter and k represents the number of hash functions used (nbHash), then according to Broder and Mitzenmacher, ( http://www.eecs.harvard.edu/~michaelm/NEWWORK/postscripts/BloomFilterSurvey.pdf ) the probability of false positives is minimized when k is approximately m/n ln(2).
Nested Class Summary | |
---|---|
static class |
BloomFilterDescriptor.BloomFilterType
Deprecated. The type of bloom filter |
Constructor Summary | |
---|---|
BloomFilterDescriptor()
Deprecated. Default constructor - used in conjunction with Writable |
|
BloomFilterDescriptor(BloomFilterDescriptor.BloomFilterType type,
int numberOfEntries)
Deprecated. Creates a BloomFilterDescriptor for the specified type of filter, fixes the number of hash functions to 4 and computes a vector size using: vectorSize = ceil((4 * n) / ln(2)) |
|
BloomFilterDescriptor(BloomFilterDescriptor.BloomFilterType type,
int vectorSize,
int nbHash)
Deprecated. |
|
BloomFilterDescriptor(BloomFilterDescriptor desc)
Deprecated. |
Method Summary | |
---|---|
int |
compareTo(Object o)
Deprecated. |
boolean |
equals(Object obj)
Deprecated. |
int |
getNbHash()
Deprecated. |
int |
getVectorSize()
Deprecated. |
int |
hashCode()
Deprecated. |
void |
readFields(DataInput in)
Deprecated. |
String |
toString()
Deprecated. |
void |
write(DataOutput out)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BloomFilterDescriptor()
public BloomFilterDescriptor(BloomFilterDescriptor desc)
public BloomFilterDescriptor(BloomFilterDescriptor.BloomFilterType type, int numberOfEntries)
type
- numberOfEntries
- public BloomFilterDescriptor(BloomFilterDescriptor.BloomFilterType type, int vectorSize, int nbHash)
type
- The kind of bloom filter to use.vectorSize
- The vector size of this filter.nbHash
- The number of hash functions to consider.Method Detail |
---|
public String toString()
toString
in class Object
public int getVectorSize()
public int getNbHash()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |