public class TestBTreeWithBloomFilter extends AbstractBTreeTestCase
BTree
with its bloom filter enabled. This class is
mostly focused on the basic bloom filter mechanics. Also see
TestIndexSegmentWithBloomFilter
which was originally written to test
the IndexSegment
behavior with a bloom filter, but which also tests
the BTree
to some extent now that the BTree
also maintains a
bloom filter.TestCase2.MyProperties, TestCase2.RandomType
keyBuilder, log, r
_randomType
Constructor and Description |
---|
TestBTreeWithBloomFilter() |
TestBTreeWithBloomFilter(String name) |
Modifier and Type | Method and Description |
---|---|
BTree |
getBTree(int branchingFactor,
boolean bloomFilter)
Return a btree backed by a journal with the indicated branching factor.
|
void |
test_add_contains()
Simple test to verify that the bloom filter does not break the semantics
of insert, lookup, contains, or remove.
|
void |
test_autoDisable()
Unit test verifies that the bloom filter is automatically disabled once
the #of entries in the
BTree exceeds the maxN (the
calculated #of index entries at which the bloom filter performance will
have degraded to below the desired maximum error rate). |
void |
test_create() |
void |
test_disable()
Unit test disables the bloom filter and verifies that a checkpoint writes
a 0L as the address of the bloom filter and that on reload the btree does
not have a bloomfilter
|
void |
test_persistence_bloomFilterDiscarded()
Simple test that the bloom filter is discarded if the btree is closed
without writing a checkpoint.
|
void |
test_persistence()
Simple test that the bloom filter is persisted with the btree and
reloaded from the store.
|
void |
test_removeAll()
Verifies that
BTree.removeAll() resets the bloom filter. |
assertChildKeys, assertEntryCounts, assertKeys, assertKeys, assertKeys, assertSameAbstractNodeData, assertSameBTree, assertSameEntryIterator, assertSameEntryIterator, assertSameIterator, assertSameIterator, assertSameLeaf, assertSameLeafData, assertSameNode, assertSameNodeData, assertSameNodeOrLeaf, assertSameRaba, assertValues, assertValues, doEntryIteratorTest, doInsertKeySequenceTest, doInsertLookupRemoveStressTest, doInsertRandomKeySequenceTest, doInsertRandomKeySequenceTest, doInsertRandomSparseKeySequenceTest, doKnownKeySequenceTest, doRandomIndexOfTest, doRandomKeyInsertTest, doRandomLookupTest, doRemoveStructureStressTest, doSplitTest, doSplitWithDecreasingKeySequence, doSplitWithIncreasingKeySequence, doSplitWithRandomDenseKeySequence, getBTree, getBTree, getKeysAndValues, getRandomKeys, getRandomKeyValues, i2k, nextLong, useRawRecords
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
public TestBTreeWithBloomFilter()
public TestBTreeWithBloomFilter(String name)
name
- public BTree getBTree(int branchingFactor, boolean bloomFilter)
SimpleEntry
objects.branchingFactor
- The branching factor.public void test_create()
public void test_add_contains()
public void test_persistence()
BloomFilter
,
AbstractBTree.bloomFilter
,
AbstractBTree#usesBloomFilter
public void test_persistence_bloomFilterDiscarded()
public void test_removeAll()
BTree.removeAll()
resets the bloom filter.public void test_disable()
public void test_autoDisable()
BTree
exceeds the maxN
(the
calculated #of index entries at which the bloom filter performance will
have degraded to below the desired maximum error rate).Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.