Class TestHRegionConcurrency
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestHRegionConcurrency
- Direct Known Subclasses:
TestHRegionConcurrencyWithInMemoryFlush
@Tag("org.apache.hadoop.hbase.testclassification.VerySlowRegionServerTests") @Tag("org.apache.hadoop.hbase.testclassification.LargeTests")
public class TestHRegionConcurrency
extends Object
Concurrent region operations with regular and in-memory-compacting MemStores.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classTestCase for appendprivate classprivate classprivate static classTestCase for incrementprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.conf.Configurationprivate static final org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroupprivate static final org.slf4j.Loggerprivate static final intprivate Stringprivate final byte[]private final byte[]private final byte[]private org.apache.hadoop.hbase.regionserver.HRegionprivate org.apache.hadoop.hbase.TableNameprivate HBaseTestingUtilprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidflushAndCompact(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] family) protected intSo can be overridden in subclasses.protected intSo can be overridden in subclasses.private org.apache.hadoop.hbase.regionserver.HRegioninitHRegion(org.apache.hadoop.conf.Configuration configuration, byte[]... families) private org.apache.hadoop.conf.Configurationprivate static voidinterruptAndJoinThreads(Thread... threads) protected booleanprivate static voidjoinThreads(Thread... threads) voidsetup(org.junit.jupiter.api.TestInfo testInfo) private voidstopWriteThreads(TestHRegionConcurrency.PutThread putThread, MultithreadedTestUtil.TestContext ctx, Thread flushThread) voidtearDown()voidFlushes the cache in a thread while scanning.voidvoidvoidvoidTest case to check append function with memstore flushingvoidTest case to check increment function with memstore flushingvoidvoidvoidWrites very wide records and gets the latest row every time..voidWrites very wide records and scans for the latest every time..void
-
Field Details
-
LOG
-
GROUP
-
THREAD_JOIN_TIMEOUT_NS
-
MAX_STORE_FILES
- See Also:
-
testUtil
-
conf
-
region
-
method
-
tableName
-
qual1
-
qual2
-
qual3
-
-
Constructor Details
-
TestHRegionConcurrency
public TestHRegionConcurrency()
-
-
Method Details
-
isInMemory
-
setup
-
tearDown
- Throws:
IOException
-
initHRegion
private org.apache.hadoop.hbase.regionserver.HRegion initHRegion(org.apache.hadoop.conf.Configuration configuration, byte[]... families) throws IOException - Throws:
IOException
-
initSplit
-
interruptAndJoinThreads
-
joinThreads
-
testGetWhileRegionClose
- Throws:
Exception
-
testFlushCacheWhileScanning
Flushes the cache in a thread while scanning. The tests verify that the scan is coherent - e.g. the returned results are always of the same or later update as the previous results. scan / compact thread join- Throws:
IOExceptionInterruptedException
-
getNumQualifiersForTestWritesWhileScanning
So can be overridden in subclasses. -
getTestCountForTestWritesWhileScanning
So can be overridden in subclasses. -
testWritesWhileScanning
Writes very wide records and scans for the latest every time.. Flushes and compacts the region every now and then to keep things realistic. by flush / scan / compaction when joining threads- Throws:
IOExceptionInterruptedException
-
testWritesWhileGetting
Writes very wide records and gets the latest row every time.. Flushes and compacts the region aggressivly to catch issues. by flush / scan / compaction when joining threads- Throws:
Exception
-
testParallelIncrementWithMemStoreFlush
Test case to check increment function with memstore flushing- Throws:
Exception
-
testParallelAppendWithMemStoreFlush
Test case to check append function with memstore flushing- Throws:
Exception
-
flushAndCompact
private static void flushAndCompact(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] family) throws IOException - Throws:
IOException
-
testFlusherCompactsStoreFiles
- Throws:
IOException
-
testMutateRowInParallel
- Throws:
Exception
-
createCompactingFlushThread
-
stopWriteThreads
private void stopWriteThreads(TestHRegionConcurrency.PutThread putThread, MultithreadedTestUtil.TestContext ctx, Thread flushThread) throws Exception - Throws:
Exception
-
testWriteThreadsCleanupAfterFlushFailure
- Throws:
Exception
-
testStopBeforeThreadStart
- Throws:
Exception
-
testThreadCleanupPreservesInterrupt
-