public class TestMasterProcedureScheduler extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TestMasterProcedureScheduler.TestNamespaceProcedure |
static class |
TestMasterProcedureScheduler.TestPeerProcedure |
static class |
TestMasterProcedureScheduler.TestRegionProcedure |
static class |
TestMasterProcedureScheduler.TestTableProcedure |
static class |
TestMasterProcedureScheduler.TestTableProcedureWithEvent |
| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private org.apache.hadoop.hbase.master.procedure.MasterProcedureScheduler |
queue |
| Constructor and Description |
|---|
TestMasterProcedureScheduler() |
| Modifier and Type | Method and Description |
|---|---|
private 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) |
void |
setUp() |
void |
tearDown() |
void |
testAcquireSharedLockWhileParentHoldingExclusiveLock() |
void |
testCreateDeleteTableOperationsWithReadLock()
Check that the table queue is not deletable until every procedure in-progress is completed
(this is a special case for read-locks).
|
void |
testCreateDeleteTableOperationsWithWriteLock()
Check that the table queue is not deletable until every procedure in-progress is completed
(this is a special case for write-locks).
|
void |
testInheritedRegionXLock() |
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 childProc) |
void |
testListLocksNamespace() |
void |
testListLocksPeer() |
void |
testListLocksRegion() |
void |
testListLocksServer() |
void |
testListLocksTable() |
void |
testListLocksWaiting() |
void |
testParentXLockAndChildrenSharedLock() |
void |
testParentXLockAndChildrenXLock() |
void |
testRootXLockAndChildrenSharedLock() |
void |
testRootXLockAndChildrenXLock() |
void |
testSimpleTableOpsQueues()
Verify simple create/insert/fetch/delete of the table queue.
|
void |
testSuspendedProcedure() |
void |
testVerifyNamespaceRwLocks() |
void |
testVerifyNamespaceXLock() |
void |
testVerifyRegionLocks() |
void |
testVerifyRwLocks()
Verify the correct logic of RWLocks on the queue
|
void |
testVerifySubProcRegionLocks() |
void |
testXLockWaitingForExecutingSharedLockToRelease() |
void |
testYieldWithSharedLockHeld() |
void |
testYieldWithXLockHeld() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private org.apache.hadoop.hbase.master.procedure.MasterProcedureScheduler queue
public org.junit.rules.TestName name
public TestMasterProcedureScheduler()
public void setUp() throws IOException
IOExceptionpublic void tearDown() throws IOException
IOExceptionpublic void testSimpleTableOpsQueues() throws Exception
Exceptionpublic void testCreateDeleteTableOperationsWithWriteLock() throws Exception
Exceptionpublic void testCreateDeleteTableOperationsWithReadLock() throws Exception
Exceptionpublic void testVerifyRwLocks() throws Exception
Exceptionpublic void testVerifyNamespaceRwLocks() throws Exception
Exceptionpublic void testVerifyNamespaceXLock() throws Exception
Exceptionpublic void testXLockWaitingForExecutingSharedLockToRelease()
public void testVerifyRegionLocks() throws Exception
Exceptionpublic void testVerifySubProcRegionLocks() throws Exception
Exceptionpublic void testInheritedRegionXLock()
public void testSuspendedProcedure() throws Exception
Exceptionprivate static org.apache.hadoop.hbase.client.RegionInfo[] generateRegionInfo(org.apache.hadoop.hbase.TableName tableName)
public void testParentXLockAndChildrenSharedLock() throws Exception
Exceptionpublic void testRootXLockAndChildrenSharedLock() throws Exception
Exceptionprivate void testInheritedXLockAndChildrenSharedLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestRegionProcedure[] childProcs) throws Exception
Exceptionpublic void testParentXLockAndChildrenXLock() throws Exception
Exceptionpublic void testRootXLockAndChildrenXLock() throws Exception
Exceptionprivate void testInheritedXLockAndChildrenXLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestTableProcedure childProc) throws Exception
Exceptionpublic void testYieldWithXLockHeld() throws Exception
Exceptionpublic void testYieldWithSharedLockHeld() throws Exception
Exceptionprivate static org.apache.hadoop.hbase.master.locking.LockProcedure createLockProcedure(org.apache.hadoop.hbase.procedure2.LockType lockType, long procId) throws Exception
Exceptionprivate static org.apache.hadoop.hbase.master.locking.LockProcedure createExclusiveLockProcedure(long procId) throws Exception
Exceptionprivate static org.apache.hadoop.hbase.master.locking.LockProcedure createSharedLockProcedure(long procId) throws Exception
Exceptionprivate static void assertLockResource(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.LockedResourceType resourceType, String resourceName)
private static void assertExclusiveLock(org.apache.hadoop.hbase.procedure2.LockedResource resource, org.apache.hadoop.hbase.procedure2.Procedure<?> procedure)
private static void assertSharedLock(org.apache.hadoop.hbase.procedure2.LockedResource resource, int lockCount)
public void testListLocksServer() throws Exception
Exceptionpublic void testListLocksNamespace() throws Exception
Exceptionpublic void testListLocksTable() throws Exception
Exceptionpublic void testListLocksRegion() throws Exception
Exceptionpublic void testListLocksPeer() throws Exception
Exceptionpublic void testListLocksWaiting() throws Exception
Exceptionpublic void testAcquireSharedLockWhileParentHoldingExclusiveLock()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.