Class TestRegionIncrement
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestRegionIncrement
Increments with some concurrency against a region to ensure we get the right answer. Test is
parameterized to run the fast and slow path increments; if fast,
HRegion.INCREMENT_FAST_BUT_NARROW_CONSISTENCY_KEY is true.
There is similar test up in TestAtomicOperation. It does a test where it has 100 threads doing increments across two column families all on one row and the increments are connected to prove atomicity on row.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
Increments a random row's Cellcount
times.private static class
Increments a single cell a bunch of times. -
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final byte[]
private static final int
private static final org.slf4j.Logger
org.junit.rules.TestName
private static HBaseTestingUtil
private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
closeRegion
(org.apache.hadoop.hbase.regionserver.HRegion region) private org.apache.hadoop.hbase.regionserver.HRegion
void
setUp()
void
tearDown()
void
Have each thread update its own Cell.void
void
Have each thread update its own Cell.
-
Field Details
-
CLASS_RULE
-
LOG
-
name
-
TEST_UTIL
-
INCREMENT_BYTES
-
THREAD_COUNT
- See Also:
-
INCREMENT_COUNT
- See Also:
-
-
Constructor Details
-
TestRegionIncrement
public TestRegionIncrement()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
getRegion
private org.apache.hadoop.hbase.regionserver.HRegion getRegion(org.apache.hadoop.conf.Configuration conf, String tableName) throws IOException - Throws:
IOException
-
closeRegion
- Throws:
IOException
-
testMVCCCausingMisRead
- Throws:
IOException
-
testUnContendedSingleCellIncrement
Have each thread update its own Cell. Avoid contention with another thread.- Throws:
IOException
InterruptedException
-
testContendedAcrossCellsIncrement
Have each thread update its own Cell. Avoid contention with another thread.- Throws:
IOException
InterruptedException
-