com.bigdata.btree
Class BloomFilter.BloomFilterCounters

java.lang.Object
  extended by com.bigdata.btree.BloomFilter.BloomFilterCounters
Enclosing class:
BloomFilter

public static class BloomFilter.BloomFilterCounters
extends Object

Counters for bloom filter access and notification of false positives.

Version:
$Id: BloomFilter.java 5809 2011-12-19 16:56:48Z thompsonbry $
Author:
Bryan Thompson
TODO:
use long here and in BTreeCounters?

Field Summary
 int nbloomAdd
          #of keys added to the bloom filter.
 int nbloomFalsePos
          #of false positives from the bloom filter in contains/lookup(key).
 int nbloomRejects
          #of keys rejected by the bloom filter in contains/lookup(key).
 int nbloomTest
          #of keys tested by the bloom filter in contains/lookup(key).
 
Constructor Summary
BloomFilter.BloomFilterCounters()
           
 
Method Summary
 void add(BloomFilter.BloomFilterCounters o)
           
 double getBloomAcceptRate()
          The effective acceptance rate for the bloom filter (1 - rejectRate).
 double getBloomErrorRate()
          The effective error rate (false positive rate) for the bloom filter.
 String getBloomFilterPerformance()
          Returns a human readable representation of the bloom filter performance, including the correct rejection rate and the false positive rate to date (or at least since the bloom filter was read from the store).
 double getBloomRejectionRate()
          The effective rejection rate (correct rejection rate) for the bloom filter.
 ICounterSet getCounters()
          Return a CounterSet reporting on the various counters tracked in the instance fields of this class.
 String toString()
          XML representation of the CounterSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nbloomAdd

public int nbloomAdd
#of keys added to the bloom filter.


nbloomTest

public int nbloomTest
#of keys tested by the bloom filter in contains/lookup(key).


nbloomRejects

public int nbloomRejects
#of keys rejected by the bloom filter in contains/lookup(key).


nbloomFalsePos

public int nbloomFalsePos
#of false positives from the bloom filter in contains/lookup(key).

Constructor Detail

BloomFilter.BloomFilterCounters

public BloomFilter.BloomFilterCounters()
Method Detail

add

public void add(BloomFilter.BloomFilterCounters o)
Parameters:
o -
TODO:
summarize when the BTreeCounters are summarized.

getBloomAcceptRate

public double getBloomAcceptRate()
The effective acceptance rate for the bloom filter (1 - rejectRate). This is the rate at which the bloom filter reports that the key is in the index. False positives occur when the filter accepts a key and the index is consulted but the key is not found in the index.

Returns:
The bloom filter acceptance rate.

getBloomRejectionRate

public double getBloomRejectionRate()
The effective rejection rate (correct rejection rate) for the bloom filter. Bloom filters do not make false negative errors, so any time the filter rejects a key we assume that it was a correct rejection.

Returns:
The bloom filter correct rejection rate.

getBloomErrorRate

public double getBloomErrorRate()
The effective error rate (false positive rate) for the bloom filter. A false positive is an instance where the bloom filter reports that the key is in the index but a read against the index demonstrates that the key does not exist in the index. False positives are in the nature of bloom filters and arise because keys may be hash equivalent for the bloom filter.

Returns:
The bloom filter error rate.

getCounters

public ICounterSet getCounters()
Return a CounterSet reporting on the various counters tracked in the instance fields of this class. FIXME Integrate with BTreeCounters. This needs to happen when we setup the bloom filter, so that is in _reopen() for both BTree and IndexSegment.


toString

public String toString()
XML representation of the CounterSet.

Overrides:
toString in class Object

getBloomFilterPerformance

public String getBloomFilterPerformance()
Returns a human readable representation of the bloom filter performance, including the correct rejection rate and the false positive rate to date (or at least since the bloom filter was read from the store).



Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.