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 SummaryNested ClassesModifier and TypeClassDescriptionprivate static classIncrements a random row's Cellcounttimes.private static classIncrements a single cell a bunch of times.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final byte[]private static final intprivate static final org.slf4j.Loggerorg.junit.rules.TestNameprivate static HBaseTestingUtilityprivate static final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidcloseRegion(org.apache.hadoop.hbase.regionserver.HRegion region) private org.apache.hadoop.hbase.regionserver.HRegionvoidsetUp()voidtearDown()voidHave each thread update its own Cell.voidvoidHave 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- 
TestRegionIncrementpublic TestRegionIncrement()
 
- 
- 
Method Details- 
setUp- Throws:
- Exception
 
- 
tearDown- Throws:
- Exception
 
- 
getRegionprivate 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
 
- 
testUnContendedSingleCellIncrementHave each thread update its own Cell. Avoid contention with another thread.- Throws:
- IOException
- InterruptedException
 
- 
testContendedAcrossCellsIncrementHave each thread update its own Cell. Avoid contention with another thread. This is- Throws:
- IOException
- InterruptedException
 
 
-