Class TestMasterProcedureScheduler
java.lang.Object
org.apache.hadoop.hbase.master.procedure.TestMasterProcedureScheduler
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.slf4j.Logger
org.junit.rules.TestName
private org.apache.hadoop.hbase.master.procedure.MasterProcedureScheduler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
assertExclusiveLock
(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.Procedure<?> procedure) private static void
assertLockResource
(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.LockedResourceType resourceType, String resourceName) private static void
assertSharedLock
(org.apache.hadoop.hbase.procedure2.LockedResource resource, int lockCount) private static org.apache.hadoop.hbase.master.locking.LockProcedure
createExclusiveLockProcedure
(long procId) private static org.apache.hadoop.hbase.master.locking.LockProcedure
createLockProcedure
(org.apache.hadoop.hbase.procedure2.LockType lockType, long procId) private static org.apache.hadoop.hbase.master.locking.LockProcedure
createSharedLockProcedure
(long procId) private static org.apache.hadoop.hbase.client.RegionInfo[]
generateRegionInfo
(org.apache.hadoop.hbase.TableName tableName) private void
releaseTableExclusiveLockAndComplete
(org.apache.hadoop.hbase.procedure2.Procedure<?> proc, org.apache.hadoop.hbase.TableName tableName) void
setUp()
void
tearDown()
void
void
Check that the table queue is not deletable until every procedure in-progress is completed (this is a special case for read-locks).void
Check that the table queue is not deletable until every procedure in-progress is completed (this is a special case for write-locks).void
private void
testInheritedXLockAndChildrenSharedLock
(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestRegionProcedure[] childProcs) private void
testInheritedXLockAndChildrenXLock
(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestTableProcedure... childProcs) void
void
void
void
void
void
void
void
void
void
void
void
Verify simple create/insert/fetch/delete of the table queue.void
void
void
void
void
Verify the correct logic of RWLocks on the queuevoid
void
void
void
-
Field Details
-
CLASS_RULE
-
LOG
-
queue
-
procedures
-
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) -
releaseTableExclusiveLockAndComplete
private void releaseTableExclusiveLockAndComplete(org.apache.hadoop.hbase.procedure2.Procedure<?> proc, 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... childProcs) 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
-
testListLocksGlobal
- Throws:
Exception
-
testListLocksWaiting
- Throws:
Exception
-