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.IntegrationTestTimeBoundedRequestsWithRegionReplicas.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 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 String |
GET_TIMEOUT_KEY |
private static org.slf4j.Logger |
LOG |
private static String |
TEST_NAME |
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, util
CHAOS_MONKEY_PROPS, monkey, MONKEY_LONG_OPT, monkeyProps, monkeyToUse, NO_CLUSTER_CLEANUP_LONG_OPT, noClusterCleanUp
Constructor and Description |
---|
IntegrationTestTimeBoundedRequestsWithRegionReplicas() |
Modifier and Type | Method and Description |
---|---|
protected String[] |
getArgsForLoadTestTool(String mode,
String modeSpecificArg,
long startKey,
long numKeys) |
protected MonkeyFactory |
getDefaultMonkeyFactory() |
static void |
main(String[] args) |
protected void |
runIngestTest(long defaultRunTime,
long keysPerServerPerIter,
int colsPerKey,
int recordSize,
int writeThreads,
int readThreads) |
void |
setConf(org.apache.hadoop.conf.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, testIngest
addOptions, cleanUp, cleanUpCluster, cleanUpMonkey, cleanUpMonkey, doWork, getConf, getTestingUtil, loadMonkeyProperties, processBaseOptions, processOptions, setUp, setUpMonkey
addOption, addOptNoArg, addOptNoArg, addOptWithArg, addOptWithArg, addRequiredOption, addRequiredOptWithArg, addRequiredOptWithArg, doStaticMain, getOptionAsDouble, getOptionAsInt, getOptionAsLong, newParser, parseArgs, parseInt, parseLong, printUsage, printUsage, processOldArgs, run
private static final org.slf4j.Logger LOG
protected static final long DEFAULT_GET_TIMEOUT
protected static final String GET_TIMEOUT_KEY
protected static final long DEFAUL_CHAOS_MONKEY_DELAY
protected static final String CHAOS_MONKEY_DELAY_KEY
protected static final int DEFAULT_REGION_REPLICATION
public IntegrationTestTimeBoundedRequestsWithRegionReplicas()
protected void startMonkey() throws Exception
startMonkey
in class IntegrationTestBase
Exception
protected MonkeyFactory getDefaultMonkeyFactory()
getDefaultMonkeyFactory
in class IntegrationTestBase
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class org.apache.hadoop.hbase.util.AbstractHBaseTool
protected void writeData(int colsPerKey, int recordSize, int writeThreads, long startKey, long numKeys) throws IOException
IOException
protected void runIngestTest(long defaultRunTime, long keysPerServerPerIter, int colsPerKey, int recordSize, int writeThreads, int readThreads) throws Exception
runIngestTest
in class IntegrationTestIngest
Exception
protected String[] getArgsForLoadTestTool(String mode, String modeSpecificArg, long startKey, long numKeys)
getArgsForLoadTestTool
in class IntegrationTestIngest
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.