Class TestMasterProcedureScheduler
java.lang.Object
org.apache.hadoop.hbase.master.procedure.TestMasterProcedureScheduler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final org.slf4j.Loggerorg.junit.rules.TestNameprivate org.apache.hadoop.hbase.master.procedure.MasterProcedureScheduler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidassertExclusiveLock(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.Procedure<?> procedure) private static voidassertLockResource(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.LockedResourceType resourceType, String resourceName) private static voidassertSharedLock(org.apache.hadoop.hbase.procedure2.LockedResource resource, int lockCount) private static org.apache.hadoop.hbase.master.locking.LockProcedurecreateExclusiveLockProcedure(long procId) private static org.apache.hadoop.hbase.master.locking.LockProcedurecreateLockProcedure(org.apache.hadoop.hbase.procedure2.LockType lockType, long procId) private static org.apache.hadoop.hbase.master.locking.LockProcedurecreateSharedLockProcedure(long procId) private static org.apache.hadoop.hbase.client.RegionInfo[]generateRegionInfo(org.apache.hadoop.hbase.TableName tableName) voidsetUp()voidtearDown()voidvoidCheck that the table queue is not deletable until every procedure in-progress is completed (this is a special case for read-locks).voidCheck that the table queue is not deletable until every procedure in-progress is completed (this is a special case for write-locks).voidprivate voidtestInheritedXLockAndChildrenSharedLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestRegionProcedure[] childProcs) private voidtestInheritedXLockAndChildrenXLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestTableProcedure childProc) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidVerify simple create/insert/fetch/delete of the table queue.voidvoidvoidvoidvoidVerify the correct logic of RWLocks on the queuevoidvoidvoidvoid
-
Field Details
-
CLASS_RULE
-
LOG
-
queue
-
name
-
-
Constructor Details
-
TestMasterProcedureScheduler
public TestMasterProcedureScheduler()
-
-
Method Details
-
setUp
- Throws:
IOException
-
tearDown
- Throws:
IOException
-
testSimpleTableOpsQueues
Verify simple create/insert/fetch/delete of the table queue.- Throws:
Exception
-
testCreateDeleteTableOperationsWithWriteLock
Check that the table queue is not deletable until every procedure in-progress is completed (this is a special case for write-locks).- Throws:
Exception
-
testCreateDeleteTableOperationsWithReadLock
Check that the table queue is not deletable until every procedure in-progress is completed (this is a special case for read-locks).- Throws:
Exception
-
testVerifyRwLocks
Verify the correct logic of RWLocks on the queue- Throws:
Exception
-
testVerifyNamespaceRwLocks
- Throws:
Exception
-
testVerifyNamespaceXLock
- Throws:
Exception
-
testVerifyRegionLocks
- Throws:
Exception
-
testVerifySubProcRegionLocks
- Throws:
Exception
-
testInheritedRegionXLock
-
testSuspendedProcedure
- Throws:
Exception
-
generateRegionInfo
private static org.apache.hadoop.hbase.client.RegionInfo[] generateRegionInfo(org.apache.hadoop.hbase.TableName tableName) -
testParentXLockAndChildrenXLock
- Throws:
Exception
-
testRootXLockAndChildrenXLock
- Throws:
Exception
-
testInheritedXLockAndChildrenXLock
private void testInheritedXLockAndChildrenXLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestTableProcedure childProc) throws Exception - Throws:
Exception
-
testYieldWithXLockHeld
- Throws:
Exception
-
createLockProcedure
private static org.apache.hadoop.hbase.master.locking.LockProcedure createLockProcedure(org.apache.hadoop.hbase.procedure2.LockType lockType, long procId) throws Exception - Throws:
Exception
-
createExclusiveLockProcedure
private static org.apache.hadoop.hbase.master.locking.LockProcedure createExclusiveLockProcedure(long procId) throws Exception - Throws:
Exception
-
assertLockResource
private static void assertLockResource(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.LockedResourceType resourceType, String resourceName) -
assertExclusiveLock
private static void assertExclusiveLock(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.Procedure<?> procedure) -
testListLocksServer
- Throws:
Exception
-
testListLocksNamespace
- Throws:
Exception
-
testListLocksTable
- Throws:
Exception
-
testListLocksRegion
- Throws:
Exception
-
testListLocksPeer
- Throws:
Exception
-
testListLocksWaiting
- Throws:
Exception
-