Package org.apache.hadoop.hbase
Class IntegrationTestDDLMasterFailover
java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
org.apache.hadoop.hbase.IntegrationTestDDLMasterFailover
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
Integration test that verifies Procedure V2. DDL operations should go through (rollforward or
rollback) when primary master is killed by ChaosMonkey (default MASTER_KILLING).
The threads run for a period of time (default 20 minutes) then are stopped at the end of runtime. Verification is performed towards those checkpoints:
Multiple Worker threads are started to randomly do the following Actions in loops: Actions generating and populating tables:
- CreateTableAction
- DisableTableAction
- EnableTableAction
- DeleteTableAction
- AddRowAction
- AddColumnFamilyAction
- AlterColumnFamilyVersionsAction
- AlterColumnFamilyEncodingAction
- DeleteColumnFamilyAction
- AddNamespaceAction
- AlterNamespaceAction
- DeleteNamespaceAction
The threads run for a period of time (default 20 minutes) then are stopped at the end of runtime. Verification is performed towards those checkpoints:
- No Actions throw Exceptions.
- No inconsistencies are detected in hbck.
This test should be run by the hbase user since it invokes hbck at the end
Usage: hbase org.apache.hadoop.hbase.IntegrationTestDDLMasterFailover -Dhbase.IntegrationTestDDLMasterFailover.runtime=1200000 -Dhbase.IntegrationTestDDLMasterFailover.numThreads=20 -Dhbase.IntegrationTestDDLMasterFailover.numRegions=50 --monkey masterKilling
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static enum
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
private class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.util.AbstractHBaseTool.OptionsOrderComparator
-
Field Summary
Modifier and TypeFieldDescriptionprotected HBaseCluster
protected org.apache.hadoop.hbase.client.Connection
protected AtomicBoolean
protected static final int
protected static final int
protected static final long
(package private) ConcurrentHashMap<org.apache.hadoop.hbase.TableName,
org.apache.hadoop.hbase.client.TableDescriptor> (package private) ConcurrentHashMap<org.apache.hadoop.hbase.TableName,
org.apache.hadoop.hbase.client.TableDescriptor> (package private) ConcurrentHashMap<org.apache.hadoop.hbase.TableName,
org.apache.hadoop.hbase.client.TableDescriptor> private boolean
private static final org.slf4j.Logger
(package private) ConcurrentHashMap<String,
org.apache.hadoop.hbase.NamespaceDescriptor> protected static final String
protected static final String
protected int
protected int
protected static final String
A soft limit on how long we should runprotected AtomicBoolean
private static final int
Fields inherited from class org.apache.hadoop.hbase.IntegrationTestBase
CHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUp, util
Fields inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
cmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)protected org.apache.hadoop.hbase.client.Connection
protected int
org.apache.hadoop.hbase.TableName
Provides the name of the table that is protected from random Chaos monkey activitystatic void
private int
runTest()
int
protected void
setConnection
(org.apache.hadoop.hbase.client.Connection connection) void
void
protected void
protected void
Methods inherited from class org.apache.hadoop.hbase.IntegrationTestBase
addOptions, cleanUp, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getDefaultMonkeyFactory, getTestingUtil, loadMonkeyProperties, processBaseOptions, processOptions, setUp, setUpMonkey, startMonkey
Methods inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getOptionAsDouble, getOptionAsInt, getOptionAsInt, getOptionAsLong, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, printUsage, processOldArgs, run, setConf
-
Field Details
-
LOG
-
SERVER_COUNT
- See Also:
-
DEFAULT_RUN_TIME
- See Also:
-
DEFAULT_NUM_THREADS
- See Also:
-
DEFAULT_NUM_REGIONS
- See Also:
-
keepObjectsAtTheEnd
-
cluster
-
connection
-
RUN_TIME_KEY
A soft limit on how long we should run- See Also:
-
NUM_THREADS_KEY
- See Also:
-
NUM_REGIONS_KEY
- See Also:
-
running
-
create_table
-
numThreads
-
numRegions
-
namespaceMap
ConcurrentHashMap<String,org.apache.hadoop.hbase.NamespaceDescriptor> namespaceMap -
enabledTables
ConcurrentHashMap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.client.TableDescriptor> enabledTables -
disabledTables
ConcurrentHashMap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.client.TableDescriptor> disabledTables -
deletedTables
ConcurrentHashMap<org.apache.hadoop.hbase.TableName,org.apache.hadoop.hbase.client.TableDescriptor> deletedTables
-
-
Constructor Details
-
IntegrationTestDDLMasterFailover
public IntegrationTestDDLMasterFailover()
-
-
Method Details
-
setUpCluster
- Specified by:
setUpCluster
in classIntegrationTestBase
- Throws:
Exception
-
cleanUpCluster
- Overrides:
cleanUpCluster
in classIntegrationTestBase
- Throws:
Exception
-
getMinServerCount
-
setConnection
-
getConnection
-
verifyNamespaces
- Throws:
IOException
-
verifyTables
- Throws:
IOException
-
testAsUnitTest
- Throws:
Exception
-
runTestFromCommandLine
- Specified by:
runTestFromCommandLine
in classIntegrationTestBase
- Throws:
Exception
-
checkException
-
runTest
- Throws:
Exception
-
getTablename
Description copied from class:IntegrationTestBase
Provides the name of the table that is protected from random Chaos monkey activity- Specified by:
getTablename
in classIntegrationTestBase
- Returns:
- table to not delete.
-
getColumnFamilies
Description copied from class:IntegrationTestBase
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)- Specified by:
getColumnFamilies
in classIntegrationTestBase
- Returns:
- set of cf names to protect.
-
main
- Throws:
Exception
-