public class TestAssignmentManager extends Object
AssignmentManager
Modifier and Type | Class and Description |
---|---|
static class |
TestAssignmentManager.MockedLoadBalancer
Mocked load balancer class used in the testcase to make sure that the testcase waits until
random assignment is called and the gate variable is set to true.
|
Constructor and Description |
---|
TestAssignmentManager() |
Modifier and Type | Method and Description |
---|---|
void |
after() |
static void |
afterClass() |
void |
before() |
static void |
beforeClass() |
void |
testAssignmentEventIgnoredIfNotExpected()
Test assignment related ZK events are ignored by AM if the region is not known
by AM to be in transition.
|
void |
testAssignmentOfRegionInSSHAndInFailedOpenState() |
void |
testBalance()
Tests AssignmentManager balance function.
|
void |
testBalanceOnMasterFailoverScenarioWithClosedNode() |
void |
testBalanceOnMasterFailoverScenarioWithOfflineNode() |
void |
testBalanceOnMasterFailoverScenarioWithOpenedNode()
Test a balance going on at same time as a master failover
|
void |
testBalanceRegionOfDeletedTable()
If a table is deleted, we should not be able to balance it anymore.
|
void |
testCloseRegionOnAbortingRS()
Tests close region call on a region server that is aborting
|
void |
testCloseRegionOnServerNotOnline()
Tests close region call on a region server that is not in onlineServer list
|
void |
testClosingFailureDuringRecovery()
Scenario:
master starts a close, and creates a znode
it fails just at this moment, before contacting the RS
while the second master is coming up, the targeted RS dies.
|
void |
testDisablingTableRegionsAssignmentDuringCleanClusterStartup()
Test verifies whether assignment is skipped for regions of tables in DISABLING state during
clean cluster startup.
|
void |
testForceAssignMergingRegion() |
void |
testMasterRestartShouldRemoveStaleZnodesOfUnknownTableAsForMeta()
Test verifies whether stale znodes of unknown tables as for the hbase:meta will be removed or
not.
|
void |
testMasterRestartWhenTableInEnabling()
Test verifies whether all the enabling table regions assigned only once during master startup.
|
void |
testOpenCloseRegionRPCIntendedForPreviousServer()
Tests an on-the-fly RPC that was scheduled for the earlier RS on the same port
for openRegion.
|
void |
testProcessDeadServersAndRegionsInTransitionShouldNotFailWithNPE()
Tests the processDeadServersAndRegionsInTransition should not fail with NPE
when it failed to get the children.
|
void |
testRegionInOpeningStateOnDeadRSWhileMasterFailover()
Test the scenario when the master is in failover and trying to process a
region which is in Opening state on a dead RS.
|
void |
testRegionPlanIsUpdatedWhenRegionFailsToOpen()
TestCase verifies that the regionPlan is updated whenever a region fails to open
and the master tries to process RS_ZK_FAILED_OPEN state.(HBASE-5546).
|
void |
testShutdownHandler()
Run a simple server shutdown handler.
|
void |
testSSHTimesOutOpeningRegionTransition()
When a region is in transition, if the region server opening the region goes down,
the region assignment takes a long time normally (waiting for timeout monitor to trigger assign).
|
void |
testSSHWhenDisableTableInProgress()
To test closed region handler to remove rit and delete corresponding znode
if region in pending close or closing while processing shutdown of a region
server.(HBASE-5927).
|
void |
testSSHWhenSplitRegionInProgress()
To test if the split region is removed from RIT if the region was in SPLITTING state but the RS
has actually completed the splitting in hbase:meta but went down.
|
void |
testUnassignWithSplitAtSameTime() |
public static void afterClass() throws IOException
IOException
public void before() throws ZooKeeperConnectionException, IOException
public void after() throws KeeperException, IOException
KeeperException
IOException
public void testBalanceOnMasterFailoverScenarioWithOpenedNode() throws IOException, KeeperException, InterruptedException, ServiceException, DeserializationException, CoordinatedStateException
IOException
KeeperException
InterruptedException
DeserializationException
ServiceException
CoordinatedStateException
public void testBalanceOnMasterFailoverScenarioWithClosedNode() throws IOException, KeeperException, InterruptedException, ServiceException, DeserializationException, CoordinatedStateException
IOException
KeeperException
InterruptedException
ServiceException
DeserializationException
CoordinatedStateException
public void testBalanceOnMasterFailoverScenarioWithOfflineNode() throws IOException, KeeperException, InterruptedException, ServiceException, DeserializationException, CoordinatedStateException
IOException
KeeperException
InterruptedException
ServiceException
DeserializationException
CoordinatedStateException
public void testBalance() throws IOException, KeeperException, DeserializationException, InterruptedException, CoordinatedStateException
IOException
KeeperException
DeserializationException
InterruptedException
CoordinatedStateException
public void testShutdownHandler() throws KeeperException, IOException, CoordinatedStateException, ServiceException
KeeperException
IOException
CoordinatedStateException
ServiceException
public void testSSHWhenDisableTableInProgress() throws KeeperException, IOException, CoordinatedStateException, ServiceException
KeeperException
IOException
ServiceException
CoordinatedStateException
public void testSSHWhenSplitRegionInProgress() throws KeeperException, IOException, Exception
KeeperException
IOException
Exception
public void testUnassignWithSplitAtSameTime() throws KeeperException, IOException, CoordinatedStateException
KeeperException
IOException
CoordinatedStateException
public void testProcessDeadServersAndRegionsInTransitionShouldNotFailWithNPE() throws IOException, KeeperException, CoordinatedStateException, InterruptedException, ServiceException
ServiceException
IOException
KeeperException
CoordinatedStateException
InterruptedException
public void testRegionPlanIsUpdatedWhenRegionFailsToOpen() throws IOException, KeeperException, ServiceException, InterruptedException, CoordinatedStateException
IOException
KeeperException
ServiceException
InterruptedException
CoordinatedStateException
public void testAssignmentOfRegionInSSHAndInFailedOpenState() throws IOException, KeeperException, ServiceException, CoordinatedStateException, InterruptedException
IOException
KeeperException
ServiceException
CoordinatedStateException
InterruptedException
public void testRegionInOpeningStateOnDeadRSWhileMasterFailover() throws IOException, KeeperException, ServiceException, CoordinatedStateException, InterruptedException
IOException
KeeperException
ServiceException
CoordinatedStateException
InterruptedException
public void testDisablingTableRegionsAssignmentDuringCleanClusterStartup() throws KeeperException, IOException, Exception
KeeperException
IOException
Exception
public void testMasterRestartWhenTableInEnabling() throws KeeperException, IOException, Exception
KeeperException
IOException
Exception
public void testMasterRestartShouldRemoveStaleZnodesOfUnknownTableAsForMeta() throws Exception
KeeperException
IOException
Exception
public void testSSHTimesOutOpeningRegionTransition() throws KeeperException, IOException, CoordinatedStateException, ServiceException
KeeperException
IOException
CoordinatedStateException
ServiceException
public void testClosingFailureDuringRecovery() throws Exception
Exception
public void testForceAssignMergingRegion() throws Exception
Exception
public void testAssignmentEventIgnoredIfNotExpected() throws KeeperException, IOException, CoordinatedStateException
KeeperException
IOException
CoordinatedStateException
public void testBalanceRegionOfDeletedTable() throws Exception
Exception
public void testOpenCloseRegionRPCIntendedForPreviousServer() throws Exception
Exception
public void testCloseRegionOnAbortingRS() throws Exception
Exception