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
Nested ClassesModifier and TypeClassDescriptionprivate static enumprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classprivate classNested classes/interfaces inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.util.AbstractHBaseTool.OptionsOrderComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HBaseClusterprotected org.apache.hadoop.hbase.client.Connectionprotected AtomicBooleanprotected static final intprotected static final intprotected 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 booleanprivate static final org.slf4j.Logger(package private) ConcurrentHashMap<String,org.apache.hadoop.hbase.NamespaceDescriptor> protected static final Stringprotected static final Stringprotected intprotected intprotected static final StringA soft limit on how long we should runprotected AtomicBooleanprivate static final intFields inherited from class org.apache.hadoop.hbase.IntegrationTestBase
CHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUp, utilFields inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
cmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS, LONG_HELP_OPTION, options, SHORT_HELP_OPTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidProvides the name of the CFs that are protected from random Chaos monkey activity (alter)protected org.apache.hadoop.hbase.client.Connectionprotected intorg.apache.hadoop.hbase.TableNameProvides the name of the table that is protected from random Chaos monkey activitystatic voidprivate intrunTest()intprotected voidsetConnection(org.apache.hadoop.hbase.client.Connection connection) voidvoidprotected voidprotected voidMethods inherited from class org.apache.hadoop.hbase.IntegrationTestBase
addOptions, cleanUp, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getDefaultMonkeyFactory, getTestingUtil, loadMonkeyProperties, processBaseOptions, processOptions, setUp, setUpMonkey, startMonkeyMethods 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:
setUpClusterin classIntegrationTestBase- Throws:
Exception
-
cleanUpCluster
- Overrides:
cleanUpClusterin classIntegrationTestBase- Throws:
Exception
-
getMinServerCount
-
setConnection
-
getConnection
-
verifyNamespaces
- Throws:
IOException
-
verifyTables
- Throws:
IOException
-
testAsUnitTest
- Throws:
Exception
-
runTestFromCommandLine
- Specified by:
runTestFromCommandLinein classIntegrationTestBase- Throws:
Exception
-
checkException
-
runTest
- Throws:
Exception
-
getTablename
Description copied from class:IntegrationTestBaseProvides the name of the table that is protected from random Chaos monkey activity- Specified by:
getTablenamein classIntegrationTestBase- Returns:
- table to not delete.
-
getColumnFamilies
Description copied from class:IntegrationTestBaseProvides the name of the CFs that are protected from random Chaos monkey activity (alter)- Specified by:
getColumnFamiliesin classIntegrationTestBase- Returns:
- set of cf names to protect.
-
main
- Throws:
Exception
-