public class TestRegionIncrement extends Object
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.
Modifier and Type | Class and Description |
---|---|
private static class |
TestRegionIncrement.CrossRowCellIncrementer
Increments a random row's Cell
count times. |
private static class |
TestRegionIncrement.SingleCellIncrementer
Increments a single cell a bunch of times.
|
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static byte[] |
INCREMENT_BYTES |
private static int |
INCREMENT_COUNT |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static HBaseTestingUtility |
TEST_UTIL |
private static int |
THREAD_COUNT |
Constructor and Description |
---|
TestRegionIncrement() |
Modifier and Type | Method and Description |
---|---|
private void |
closeRegion(org.apache.hadoop.hbase.regionserver.HRegion region) |
private org.apache.hadoop.hbase.regionserver.HRegion |
getRegion(org.apache.hadoop.conf.Configuration conf,
String tableName) |
void |
setUp() |
void |
tearDown() |
void |
testContendedAcrossCellsIncrement()
Have each thread update its own Cell.
|
void |
testMVCCCausingMisRead() |
void |
testUnContendedSingleCellIncrement()
Have each thread update its own Cell.
|
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
public org.junit.rules.TestName name
private static HBaseTestingUtility TEST_UTIL
private static final byte[] INCREMENT_BYTES
private static final int THREAD_COUNT
private static final int INCREMENT_COUNT
public TestRegionIncrement()
private org.apache.hadoop.hbase.regionserver.HRegion getRegion(org.apache.hadoop.conf.Configuration conf, String tableName) throws IOException
IOException
private void closeRegion(org.apache.hadoop.hbase.regionserver.HRegion region) throws IOException
IOException
public void testMVCCCausingMisRead() throws IOException
IOException
public void testUnContendedSingleCellIncrement() throws IOException, InterruptedException
IOException
InterruptedException
public void testContendedAcrossCellsIncrement() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.