|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.migration.nineteen.onelab.filter.Filter
org.apache.hadoop.hbase.migration.nineteen.onelab.filter.BloomFilter
org.apache.hadoop.hbase.migration.nineteen.onelab.filter.RetouchedBloomFilter
public final class RetouchedBloomFilter
Implements a retouched Bloom filter, as defined in the CoNEXT 2006 paper.
It allows the removal of selected false positives at the cost of introducing random false negatives, and with the benefit of eliminating some random false positives at the same time. contract European Commission One-Lab Project 034819.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.migration.nineteen.onelab.filter.Filter |
---|
hash, hashType, nbHash, vectorSize |
Fields inherited from interface org.apache.hadoop.hbase.migration.nineteen.onelab.filter.RemoveScheme |
---|
MAXIMUM_FP, MINIMUM_FN, RANDOM, RATIO |
Constructor Summary | |
---|---|
RetouchedBloomFilter()
Default constructor - use with readFields |
|
RetouchedBloomFilter(int vectorSize,
int nbHash,
int hashType)
Constructor |
Method Summary | |
---|---|
void |
add(Key key)
Adds a key to this filter. |
void |
addFalsePositive(Collection<Key> coll)
Adds a collection of false positive information to this retouched Bloom filter. |
void |
addFalsePositive(Key key)
Adds a false positive information to this retouched Bloom filter. |
void |
addFalsePositive(Key[] keys)
Adds an array of false positive information to this retouched Bloom filter. |
void |
addFalsePositive(List<Key> keys)
Adds a list of false positive information to this retouched Bloom filter. |
void |
readFields(DataInput in)
|
void |
selectiveClearing(Key k,
short scheme)
Performs the selective clearing for a given key. |
void |
write(DataOutput out)
|
Methods inherited from class org.apache.hadoop.hbase.migration.nineteen.onelab.filter.BloomFilter |
---|
and, clone, getVectorSize, membershipTest, not, or, toString, xor |
Methods inherited from class org.apache.hadoop.hbase.migration.nineteen.onelab.filter.Filter |
---|
add, add, add |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RetouchedBloomFilter()
public RetouchedBloomFilter(int vectorSize, int nbHash, int hashType)
vectorSize
- The vector size of this filter.nbHash
- The number of hash function to consider.hashType
- type of the hashing function (see Hash
).Method Detail |
---|
public void add(Key key)
Filter
add
in class BloomFilter
key
- The key to add.public void addFalsePositive(Key key)
Invariant: if the false positive is null
, nothing happens.
key
- The false positive key to add.public void addFalsePositive(Collection<Key> coll)
coll
- The collection of false positive.public void addFalsePositive(List<Key> keys)
keys
- The list of false positive.public void addFalsePositive(Key[] keys)
keys
- The array of false positive.public void selectiveClearing(Key k, short scheme)
k
- The false positive key to remove from this retouched Bloom filter.scheme
- The selective clearing scheme to apply.public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class BloomFilter
IOException
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class BloomFilter
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |