Package org.apache.hadoop.hbase
Class IntegrationTestBase
java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
- Direct Known Subclasses:
IntegrationTestAcidGuarantees,IntegrationTestBackupRestore,IntegrationTestBigLinkedList,IntegrationTestBulkLoad,IntegrationTestDDLMasterFailover,IntegrationTestIngest,IntegrationTestLoadAndVerify,IntegrationTestLoadCommonCrawl,IntegrationTestMobCompaction,IntegrationTestRegionReplicaPerf,IntegrationTestTableSnapshotInputFormat
Base class for HBase integration tests that want to use the Chaos Monkey. Usage: bin/hbase
<sub_class_of_IntegrationTestBase> <options> Options: -h,--help Show usage -m,--monkey
<arg> Which chaos monkey to run -monkeyProps <arg> The properties file for specifying chaos
monkey properties. -ncc Option to not clean up the cluster at the end.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.util.AbstractHBaseTool.OptionsOrderComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static final org.slf4j.Loggerprotected ChaosMonkeystatic final Stringprotected Propertiesprotected Stringstatic final Stringprotected booleanprotected IntegrationTestingUtilityFields 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 TypeMethodDescriptionprotected voidvoidcleanUp()voidvoidprotected voidcleanUpMonkey(String why) protected intdoWork()Provides the name of the CFs that are protected from random Chaos monkey activity (alter)org.apache.hadoop.conf.ConfigurationgetConf()protected MonkeyFactoryabstract org.apache.hadoop.hbase.TableNameProvides the name of the table that is protected from random Chaos monkey activityprotected IntegrationTestingUtilitygetTestingUtil(org.apache.hadoop.conf.Configuration conf) static voidloadMonkeyProperties(Properties props, org.apache.hadoop.conf.Configuration conf) Loads entries from the providedconfintopropswhen the configuration key is one that may be configuring ChaosMonkey actions.protected voidprocessBaseOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) This allows tests that subclass children of this base class such asIntegrationTestReplicationto include the base options without having to also include the options from the test.protected voidprocessOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) abstract intvoidsetUp()abstract voidvoidprotected voidMethods 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
-
NO_CLUSTER_CLEANUP_LONG_OPT
- See Also:
-
MONKEY_LONG_OPT
- See Also:
-
CHAOS_MONKEY_PROPS
- See Also:
-
LOG
-
util
-
monkey
-
monkeyToUse
-
monkeyProps
-
noClusterCleanUp
-
-
Constructor Details
-
IntegrationTestBase
public IntegrationTestBase() -
IntegrationTestBase
-
-
Method Details
-
addOptions
- Specified by:
addOptionsin classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
processBaseOptions
protected void processBaseOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) This allows tests that subclass children of this base class such asIntegrationTestReplicationto include the base options without having to also include the options from the test.- Parameters:
cmd- the command line
-
loadMonkeyProperties
public static void loadMonkeyProperties(Properties props, org.apache.hadoop.conf.Configuration conf) Loads entries from the providedconfintopropswhen the configuration key is one that may be configuring ChaosMonkey actions. -
processOptions
- Specified by:
processOptionsin classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
getConf
- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable- Overrides:
getConfin classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
doWork
- Specified by:
doWorkin classorg.apache.hadoop.hbase.util.AbstractHBaseTool- Throws:
Exception
-
setUp
- Throws:
Exception
-
cleanUp
- Throws:
Exception
-
setUpMonkey
- Throws:
Exception
-
getDefaultMonkeyFactory
-
startMonkey
- Throws:
Exception
-
cleanUpMonkey
- Throws:
Exception
-
cleanUpMonkey
- Throws:
Exception
-
getTestingUtil
-
setUpCluster
- Throws:
Exception
-
cleanUpCluster
- Throws:
Exception
-
runTestFromCommandLine
- Throws:
Exception
-
getTablename
Provides the name of the table that is protected from random Chaos monkey activity- Returns:
- table to not delete.
-
getColumnFamilies
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)- Returns:
- set of cf names to protect.
-