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
IOException
public void tearDown() throws IOException
IOException
public void testSimpleTableOpsQueues() throws Exception
Exception
public void testCreateDeleteTableOperationsWithWriteLock() throws Exception
Exception
public void testCreateDeleteTableOperationsWithReadLock() throws Exception
Exception
public void testVerifyRwLocks() throws Exception
Exception
public void testVerifyNamespaceRwLocks() throws Exception
Exception
public void testVerifyNamespaceXLock() throws Exception
Exception
public void testXLockWaitingForExecutingSharedLockToRelease()
public void testVerifyRegionLocks() throws Exception
Exception
public void testVerifySubProcRegionLocks() throws Exception
Exception
public void testInheritedRegionXLock()
public void testSuspendedProcedure() throws Exception
Exception
private static org.apache.hadoop.hbase.client.RegionInfo[] generateRegionInfo(org.apache.hadoop.hbase.TableName tableName)
public void testParentXLockAndChildrenSharedLock() throws Exception
Exception
public void testRootXLockAndChildrenSharedLock() throws Exception
Exception
private void testInheritedXLockAndChildrenSharedLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestRegionProcedure[] childProcs) throws Exception
Exception
public void testParentXLockAndChildrenXLock() throws Exception
Exception
public void testRootXLockAndChildrenXLock() throws Exception
Exception
private void testInheritedXLockAndChildrenXLock(org.apache.hadoop.hbase.TableName tableName, TestMasterProcedureScheduler.TestTableProcedure rootProc, TestMasterProcedureScheduler.TestTableProcedure childProc) throws Exception
Exception
public void testYieldWithXLockHeld() throws Exception
Exception
public void testYieldWithSharedLockHeld() throws Exception
Exception
private static org.apache.hadoop.hbase.master.locking.LockProcedure createLockProcedure(org.apache.hadoop.hbase.procedure2.LockType lockType, long procId) throws Exception
Exception
private static org.apache.hadoop.hbase.master.locking.LockProcedure createExclusiveLockProcedure(long procId) throws Exception
Exception
private static org.apache.hadoop.hbase.master.locking.LockProcedure createSharedLockProcedure(long procId) throws Exception
Exception
private 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
Exception
public void testListLocksNamespace() throws Exception
Exception
public void testListLocksTable() throws Exception
Exception
public void testListLocksRegion() throws Exception
Exception
public void testListLocksPeer() throws Exception
Exception
public void testListLocksWaiting() throws Exception
Exception
public void testAcquireSharedLockWhileParentHoldingExclusiveLock()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.