public class TestSegSplitter extends AbstractTestSegSplitter
src/architecture/SplitMath.xls
AbstractTestSegSplitter.MockPartitionIdFactory, AbstractTestSegSplitter.RejectSplitsAfterKey
TestCase2.MyProperties, TestCase2.RandomType
acceptAllSplits, pidFactory, rejectAllSplits
_randomType, log
Constructor and Description |
---|
TestSegSplitter() |
TestSegSplitter(String name) |
Modifier and Type | Method and Description |
---|---|
protected BTree |
generateData(IJournal store,
String name,
int ntuples,
LocalPartitionMetadata pmd)
Register a
BTree against the journal, generate some data in the
specified key range, and commit the data. |
void |
test_split_applicationConstraint_acceptAllSplits()
Unit test using an
ISimpleSplitHandler which accepts all splits
(the behavior should be the same as if there were no override). |
void |
test_split_applicationConstraint_rejectAllSplits()
Unit test using an
ISimpleSplitHandler which rejects all splits. |
void |
test_split_applicationConstraint_remainerGoesIntoSplit()
Unit test when the application specifies a split handler which accepts
the first N splits of a multiway split but then rejects all other split
points.
|
void |
test_split_fromToKeyConstraints()
A unit test which examines correctness when the fromKey and/or toKey are
non-
null . |
void |
test_split_lower_bounds()
A unit test when the split would create two or three index segments (both
cases are tested here to cover the lower bound and the near lower bound).
|
void |
test_split_segment_underflow()
Unit test the edge cases surrounding when an index partition is split.
|
void |
test_split_stress()
A stress test which increases the target number of splits until each
split would have only one tuple.
|
void |
test_split_upper_bound()
A unit test for fence posts when nominal shard size is so small that we
will get only one tuple into each generated split.
|
doBuild, getStore
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 TestSegSplitter()
public TestSegSplitter(String name)
name
- protected BTree generateData(IJournal store, String name, int ntuples, LocalPartitionMetadata pmd)
BTree
against the journal, generate some data in the
specified key range, and commit the data.
Note: this uses int values to generate the keys. If you specify the fromKey as anything other than an empty byte[] or the toKey as anything other than null then the key must be at least 4 bytes long and the 1st 4 bytes will be decoded as an integer.
store
- ntuples
- pmd
- public void test_split_segment_underflow() throws Exception
Exception
src/architecture/SplitMath.xls, for the math concerning the #of
splits to be generated from an index segment file of a given size.
public void test_split_lower_bounds() throws Exception
Exception
public void test_split_upper_bound() throws Exception
Exception
public void test_split_stress() throws Exception
Exception
public void test_split_fromToKeyConstraints() throws Exception
null
. This models the normal case when the index segment
is part of any shard except the first shard of the scale-out index.Exception
public void test_split_applicationConstraint_acceptAllSplits() throws Exception
ISimpleSplitHandler
which accepts all splits
(the behavior should be the same as if there were no override).Exception
public void test_split_applicationConstraint_rejectAllSplits() throws Exception
ISimpleSplitHandler
which rejects all splits.
No Split
s will be chosen and the IndexSegment
WILL NOT be
split.Exception
public void test_split_applicationConstraint_remainerGoesIntoSplit() throws Exception
Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.