public class TestMasterTaskWithRedirect extends AbstractMasterTestCase
TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
TestMasterTaskWithRedirect() |
TestMasterTaskWithRedirect(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_redirectStressTest()
Stress test for redirects.
|
void |
test_startWriteRedirectStop()
Unit test verifies correct redirect of a write.
|
void |
test_startWriteRedirectWithReopenStop()
Unit test verifies correct redirect of a write arising during awaitAll()
in the master and occurring after there has already been a write on the
partition which is the target of the redirect.
|
awaitChunksOut, 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 TestMasterTaskWithRedirect()
public TestMasterTaskWithRedirect(String name)
public void test_startWriteRedirectStop() throws InterruptedException, ExecutionException
public void test_startWriteRedirectWithReopenStop() throws InterruptedException, ExecutionException
public void test_redirectStressTest() throws InterruptedException, ExecutionException
Redirects are stored in a map whose key is effectively the first byte of
the KVO
key. This map is pre-populated so that all bytes are
mapped randomly assigned to N distinct locators, L(0..N-1). The test
writes KVO
tuples on a master
. The master allocates
the tuples to output buffers based on the redirects mapping.
The test periodically simulates MOVEs by the atomic update of an entry in
the M#redirects
map. Note that we can not simulate SPLIT or JOIN
since the indirection is by the first byte from the key rather than a key
range (fixed granularity).
For simplicity, the keys are N bytes in length and are generated using a uniform distribution. The set of "valid" locators is maintained by the test. The redirects choose a byte at random and redirect it to the next available locator. For example, the first redirect chooses a byte at random in [0:255] and the new target for that locator is L(N), where N is the index of the next locator to be assigned. A thread issues redirects at random intervals.
The test ends when either AbstractMasterStats.elementsOut
or
AbstractMasterStats.redirectCount
exceeds some threshold or if
there is an error.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.