Package org.apache.hadoop.hbase.master
Class TestMasterTransitions
java.lang.Object
org.apache.hadoop.hbase.master.TestMasterTransitions
Test transitions of state across the master. Sets up the cluster once and then runs a couple of
tests.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final byte[][]
private static final org.slf4j.Logger
private static final org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static int
addToEachStartKey
(int expected) static void
static void
Start up a mini cluster and put a small table of many empty regions into it.private static byte[]
getStartKey
(org.apache.hadoop.hbase.client.RegionInfo hri) private static byte[]
private static byte[]
void
setup()
void
Test adding in a new server before old one on same host+port is dead.void
In 2482, a RS with an opening region on it dies.void
In 2428, the meta region has just been set offline and then a close comes in.
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
TABLENAME
-
FAMILIES
-
-
Constructor Details
-
TestMasterTransitions
public TestMasterTransitions()
-
-
Method Details
-
beforeAllTests
Start up a mini cluster and put a small table of many empty regions into it.- Throws:
Exception
-
afterAllTests
- Throws:
Exception
-
setup
- Throws:
IOException
-
testRegionCloseWhenNoMetaHBase2428
In 2428, the meta region has just been set offline and then a close comes in.- Throws:
Exception
- See Also:
-
testAddingServerBeforeOldIsDead2413
Test adding in a new server before old one on same host+port is dead. Make the test more onerous by having the server under test carry the meta. If confusion between old and new, purportedly meta never comes back. Test that meta gets redeployed.- Throws:
IOException
-
testKillRSWithOpeningRegion2482
In 2482, a RS with an opening region on it dies. The said region is then stuck in the master's regions-in-transition and never leaves it. This test works by bringing up a new regionserver, waiting for the load balancer to give it some regions. Then, we close all on the new server. After sending all the close messages, we send the new regionserver the special blocking message so it can not process any more messages. Meantime reopening of the just-closed regions is backed up on the new server. Soon as master gets an opening region from the new regionserver, we kill it. We then wait on all regions to come back on line. If bug is fixed, this should happen soon as the processing of the killed server is done.- Throws:
Exception
- See Also:
-
addToEachStartKey
- Throws:
IOException
-
getStartKey
-
getTestFamily
-
getTestQualifier
-