public class IntegrationTestTimeBoundedRequestsWithRegionReplicas extends IntegrationTestIngest
This test uses LoadTestTool to read and write the data from a single client but multiple threads. The data is written first, then we allow the region replicas to catch up. Then we start the reader threads doing get requests with stale mode true. Chaos Monkey is started after some delay (20 sec by default) after the reader threads are started so that there is enough time to fully cache meta. These parameters (and some other parameters from LoadTestTool) can be used to control behavior, given values are default:
-Dhbase.DIntegrationTestTimeBoundedRequestsWithRegionReplicas.runtime=600000 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_regions_per_server=5 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.get_timeout_ms=5000 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_keys_per_server=2500 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.region_replication=3 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_read_threads=20 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_write_threads=20 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_regions_per_server=5 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.chaos_monkey_delay=20000Use this test with "serverKilling" ChaosMonkey. Sample usage:
hbase org.apache.hadoop.hbase.test.IntegrationTestTimeBoundedRequestsWithRegionReplicas -Dhbase.IntegrationTestTimeBoundedRequestsWithRegionReplicas.runtime=600000 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_write_threads=40 -DIntegrationTestTimeBoundedRequestsWithRegionReplicas.num_read_threads=40 -Dhbase.ipc.client.allowsInterrupt=true --monkey serverKilling
| Modifier and Type | Class and Description |
|---|---|
static class |
IntegrationTestTimeBoundedRequestsWithRegionReplicas.TimeBoundedMultiThreadedReader |
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CHAOS_MONKEY_DELAY_KEY |
protected static long |
DEFAUL_CHAOS_MONKEY_DELAY |
protected static long |
DEFAULT_GET_TIMEOUT |
protected static int |
DEFAULT_REGION_REPLICATION |
protected static java.lang.String |
GET_TIMEOUT_KEY |
cluster, DEFAULT_NUM_KEYS_PER_SERVER, DEFAULT_NUM_READ_THREADS, DEFAULT_NUM_WRITE_THREADS, DEFAULT_RUN_TIME, HIPHEN, JUNIT_RUN_TIME, LOAD_TEST_TOOL_INIT_ARGS, loadTool, NUM_KEYS_PER_SERVER_KEY, NUM_READ_THREADS_KEY, NUM_WRITE_THREADS_KEY, RUN_TIME_KEY, utilCHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUpcmdLineArgs, conf, EXIT_FAILURE, EXIT_SUCCESS| Constructor and Description |
|---|
IntegrationTestTimeBoundedRequestsWithRegionReplicas() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String[] |
getArgsForLoadTestTool(java.lang.String mode,
java.lang.String modeSpecificArg,
long startKey,
long numKeys) |
protected MonkeyFactory |
getDefaultMonkeyFactory() |
static void |
main(java.lang.String[] args) |
protected void |
runIngestTest(long defaultRunTime,
long keysPerServerPerIter,
int colsPerKey,
int recordSize,
int writeThreads,
int readThreads) |
void |
setConf(Configuration conf) |
protected void |
startMonkey() |
protected void |
writeData(int colsPerKey,
int recordSize,
int writeThreads,
long startKey,
long numKeys) |
getArgsForLoadTestToolInitTable, getColumnFamilies, getMinServerCount, getNumKeys, getTablename, initTable, internalRunIngestTest, runTestFromCommandLine, setUpCluster, testIngestaddOptions, cleanUp, cleanUpCluster, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getTestingUtil, processBaseOptions, processOptions, setUp, setUpMonkeyaddOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, parseArgs, parseInt, parseLong, printUsage, printUsage, runprotected static final long DEFAULT_GET_TIMEOUT
protected static final java.lang.String GET_TIMEOUT_KEY
protected static final long DEFAUL_CHAOS_MONKEY_DELAY
protected static final java.lang.String CHAOS_MONKEY_DELAY_KEY
protected static final int DEFAULT_REGION_REPLICATION
public IntegrationTestTimeBoundedRequestsWithRegionReplicas()
protected void startMonkey()
throws java.lang.Exception
startMonkey in class IntegrationTestBasejava.lang.Exceptionprotected MonkeyFactory getDefaultMonkeyFactory()
getDefaultMonkeyFactory in class IntegrationTestBasepublic void setConf(Configuration conf)
setConf in class AbstractHBaseToolprotected void writeData(int colsPerKey,
int recordSize,
int writeThreads,
long startKey,
long numKeys)
throws java.io.IOException
java.io.IOExceptionprotected void runIngestTest(long defaultRunTime,
long keysPerServerPerIter,
int colsPerKey,
int recordSize,
int writeThreads,
int readThreads)
throws java.lang.Exception
runIngestTest in class IntegrationTestIngestjava.lang.Exceptionprotected java.lang.String[] getArgsForLoadTestTool(java.lang.String mode,
java.lang.String modeSpecificArg,
long startKey,
long numKeys)
getArgsForLoadTestTool in class IntegrationTestIngestpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception