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
Modifier and TypeFieldDescriptionstatic final String
static final String
private String
private static final org.slf4j.Logger
protected ChaosMonkey
static final String
protected Properties
protected String
protected boolean
static final String
private String
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 TypeMethodDescriptionvoid
protected int
doWork()
void
protected MonkeyFactory
org.apache.hadoop.hbase.TableName
protected IntegrationTestingUtility
getTestingUtil
(org.apache.hadoop.conf.Configuration conf) private boolean
isDistributedCluster
(org.apache.hadoop.conf.Configuration conf) static void
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>.protected void
processOptions
(org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine cmd) void
void
Methods 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:
addOptions
in classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
processOptions
- Specified by:
processOptions
in classorg.apache.hadoop.hbase.util.AbstractHBaseTool
-
doWork
- Specified by:
doWork
in 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"?>hbase.it.clustermanager.class org.apache.hadoop.hbase.MyCustomClusterManager - Throws:
Exception
-