Class IntegrationTestTimeBoundedRequestsWithRegionReplicas

java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
org.apache.hadoop.hbase.IntegrationTestIngest
org.apache.hadoop.hbase.test.IntegrationTestTimeBoundedRequestsWithRegionReplicas
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
Direct Known Subclasses:
IntegrationTestTimeBoundedMultiGetRequestsWithRegionReplicas

An IntegrationTest for doing reads with a timeout, to a read-only table with region replicas. ChaosMonkey is run which kills the region servers and master, but ensures that meta region server is not killed, and at most 2 region servers are dead at any point in time. The expected behavior is that all reads with stale mode true will return before the timeout (5 sec by default). The test fails if the read requests does not finish in time.

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=20000
 
Use 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