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
Modifier and TypeFieldDescriptionstatic final String
private static final org.slf4j.Logger
protected ChaosMonkey
static final String
protected Properties
protected String
static final String
protected boolean
protected IntegrationTestingUtility
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 TypeMethodDescriptionprotected void
void
cleanUp()
void
void
protected void
cleanUpMonkey
(String why) protected int
doWork()
Provides the name of the CFs that are protected from random Chaos monkey activity (alter)org.apache.hadoop.conf.Configuration
getConf()
protected MonkeyFactory
abstract org.apache.hadoop.hbase.TableName
Provides the name of the table that is protected from random Chaos monkey activityprotected IntegrationTestingUtility
getTestingUtil
(org.apache.hadoop.conf.Configuration conf) static void
loadMonkeyProperties
(Properties props, org.apache.hadoop.conf.Configuration conf) Loads entries from the providedconf
intoprops
when the configuration key is one that may be configuring ChaosMonkey actions.protected void
processBaseOptions
(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) This allows tests that subclass children of this base class such asIntegrationTestReplication
to include the base options without having to also include the options from the test.protected void
processOptions
(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) abstract int
void
setUp()
abstract void
void
protected void
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
-
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:
addOptions
in 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 asIntegrationTestReplication
to 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 providedconf
intoprops
when the configuration key is one that may be configuring ChaosMonkey actions. -
processOptions
- Specified by:
processOptions
in classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
getConf
- Specified by:
getConf
in interfaceorg.apache.hadoop.conf.Configurable
- Overrides:
getConf
in classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
doWork
- Specified by:
doWork
in 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.
-