public class TestMasterTaskWithSplits extends AbstractKeyRangeMasterTestCase
IMetadataIndex
), which
allows us to test the AbstractMasterTask
under split, move, join and
other kinds of index partition operations.TestAll
.
Note: KeyBuilder.decodeBigInteger(int, byte[])
has since
been written. However, the encoding of a BigInteger
as an
unsigned byte[] requires a 2 byte signum/runLength prefix. Thus,
while KeyBuilder.append(BigInteger)
and the decode method
might be used to complete this test case, the separator keys will
need to be properly formed initially in order to have the leading
signum/runlength. The null
for the last rightSeparator
will also need to be handled specially.
TestCase2.MyProperties, TestCase2.RandomType
dataServices
_randomType, log
Constructor and Description |
---|
TestMasterTaskWithSplits() |
TestMasterTaskWithSplits(String arg0) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
getSeparatorKey(byte[] leftSeparator,
byte[] rightSeparator)
Method returns a separator key which lies 1/2 between the given separator
keys.
|
void |
test_decodeKey()
Unit tests to verify the math used to compute the separator keys.
|
void |
test_getSeparatorKey()
FIXME Verify that the separator keys are properly ordered.
|
void |
test_redirectStressTestWithSplits()
Stress test for redirects.
|
awaitChunksOut, getRandomDataService, tearDown
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, toString
public TestMasterTaskWithSplits()
public TestMasterTaskWithSplits(String arg0)
arg0
- protected byte[] getSeparatorKey(byte[] leftSeparator, byte[] rightSeparator)
null
, which may only appear as
the right separator, corresponds to 2^64
. The math is
performed using BigInteger
.leftSeparator
- The left separator key. The left-most separator key is always
an empty byte[] (byte[0]
).rightSeparator
- The right separator key. The right-most separator key is
always null
.public void test_decodeKey()
BigInteger
values is being carried out. [See notes at the top
of this file.]public void test_getSeparatorKey()
null
rightSeparator specially.]public void test_redirectStressTestWithSplits() throws InterruptedException, ExecutionException
Redirects are stored in an IMetadataIndex
so we may test the
behavior under SPLITs, MOVEs, or JOINs. The test writes KVO
tuples on a master
. The master allocates the tuples to output
buffers based on the IMetadataIndex
mapping. A single thread
executes an Op
[] schedule while N concurrent producer threads
write on the master. The test ends when the schedule is done.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.