Class TestWALLockup
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestWALLockup
Testing for lock up of FSHLog.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final Stringprivate static final byte[]private static org.apache.hadoop.conf.Configurationprivate Stringprivate static final org.slf4j.Loggerorg.junit.rules.TestName(package private) org.apache.hadoop.hbase.regionserver.HRegionprotected org.apache.hadoop.hbase.TableNameprivate static HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetName()private static org.apache.hadoop.hbase.regionserver.HRegioninitHRegion(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, byte[] stopKey, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.wal.WAL wal) voidsetup()voidtearDown()voidReproduce locking up that happens when we get an inopportune sync during setup for zigzaglatch wait.voidIf below is broken, we will see this test timeout because RingBufferEventHandler was stuck in attainSafePoint.
-
Field Details
-
CLASS_RULE
-
LOG
-
name
-
COLUMN_FAMILY
- See Also:
-
COLUMN_FAMILY_BYTES
-
region
org.apache.hadoop.hbase.regionserver.HRegion region -
TEST_UTIL
-
CONF
-
dir
-
tableName
-
-
Constructor Details
-
TestWALLockup
public TestWALLockup()
-
-
Method Details
-
setup
- Throws:
IOException
-
tearDown
- Throws:
Exception
-
getName
-
testLockupWhenSyncInMiddleOfZigZagSetup
Reproduce locking up that happens when we get an inopportune sync during setup for zigzaglatch wait. See HBASE-14317. If below is broken, we will see this test timeout because it is locked up.First I need to set up some mocks for Server and RegionServerServices. I also need to set up a dodgy WAL that will throw an exception when we go to append to it.
- Throws:
IOException
-
testRingBufferEventHandlerStuckWhenSyncFailed
public void testRingBufferEventHandlerStuckWhenSyncFailed() throws IOException, InterruptedExceptionIf below is broken, we will see this test timeout because RingBufferEventHandler was stuck in attainSafePoint. Everyone will wait for sync to finish forever. See HBASE-14317.- Throws:
IOExceptionInterruptedException
-
initHRegion
private static org.apache.hadoop.hbase.regionserver.HRegion initHRegion(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, byte[] stopKey, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.wal.WAL wal) throws IOException - Returns:
- A region on which you must call
HBaseTestingUtility.closeRegionAndWAL(HRegion)when done. - Throws:
IOException
-