Class ChaosMonkeyRunner
java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.chaos.util.ChaosMonkeyRunner
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
- Direct Known Subclasses:
IntegrationTestMonkeys
-
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 Stringstatic final Stringprivate Stringprivate static final org.slf4j.Loggerprotected ChaosMonkeystatic final Stringprotected Propertiesprotected Stringprotected booleanstatic final Stringprivate Stringprotected 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 TypeMethodDescriptionvoidprotected intdoWork()voidprotected MonkeyFactoryorg.apache.hadoop.hbase.TableNameprotected IntegrationTestingUtilitygetTestingUtil(org.apache.hadoop.conf.Configuration conf) private booleanisDistributedCluster(org.apache.hadoop.conf.Configuration conf) static voidIf caller wants to add config parameters from a file, the path to the conf file can be passed like this: -c <path-to-conf>.protected voidprocessOptions(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) voidvoidMethods inherited from class org.apache.hadoop.hbase.util.AbstractHBaseTool
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getConf, getOptionAsDouble, getOptionAsInt, getOptionAsInt, getOptionAsLong, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, printUsage, processOldArgs, run, setConf
-
Field Details
-
LOG
-
MONKEY_LONG_OPT
- See Also:
-
CHAOS_MONKEY_PROPS
- See Also:
-
TABLE_NAME_OPT
- See Also:
-
FAMILY_NAME_OPT
- See Also:
-
util
-
monkey
-
monkeyToUse
-
monkeyProps
-
noClusterCleanUp
-
tableName
-
familyName
-
-
Constructor Details
-
ChaosMonkeyRunner
public ChaosMonkeyRunner()
-
-
Method Details
-
addOptions
- Specified by:
addOptionsin classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
processOptions
- Specified by:
processOptionsin classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
doWork
- Specified by:
doWorkin classorg.apache.hadoop.hbase.util.AbstractHBaseTool- Throws:
Exception
-
stopRunner
-
setUpCluster
- Throws:
Exception
-
isDistributedCluster
-
getAndStartMonkey
- Throws:
Exception
-
getTestingUtil
-
getDefaultMonkeyFactory
-
getTablename
-
getColumnFamilies
-
main
If caller wants to add config parameters from a file, the path to the conf file can be passed like this: -c <path-to-conf>. The file is presumed to have the Configuration file xml format and is added as a new Resource to the current Configuration. Use this mechanism to set Configuration such as what ClusterManager to use, etc. Here is an example file you might references that sets an alternate ClusterManager: {code} <?xml version="1.0" encoding="UTF-8"?> {code} NOTE: The code searches for the file name passed on the CLASSPATH! Passing the path to a file will not work! Add the file to the CLASSPATH and then pass the filename as the '-c' arg.hbase.it.clustermanager.class org.apache.hadoop.hbase.MyCustomClusterManager - Throws:
Exception
-