Class IntegrationTestRegionReplicaReplication

java.lang.Object
org.apache.hadoop.hbase.util.AbstractHBaseTool
org.apache.hadoop.hbase.IntegrationTestBase
org.apache.hadoop.hbase.IntegrationTestIngest
org.apache.hadoop.hbase.IntegrationTestRegionReplicaReplication
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

Integration test for testing async wal replication to secondary region replicas. Sets up a table with given region replication (default 2), and uses LoadTestTool client writer, updater and reader threads for writes and reads and verification. It uses a delay queue with a given delay ("read_delay_ms", default 5000ms) between the writer/updater and reader threads to make the written items available to readers. This means that a reader will only start reading from a row written by the writer / updater after 5secs has passed. The reader thread performs the reads from the given region replica id (default 1) to perform the reads. Async wal replication has to finish with the replication of the edits before read_delay_ms to the given region replica id so that the read and verify will not fail. The job will run for at least given runtime (default 10min) by running a concurrent writer and reader workload followed by a concurrent updater and reader workload for num_keys_per_server.

Example usage:

 hbase org.apache.hadoop.hbase.IntegrationTestRegionReplicaReplication
 -DIntegrationTestRegionReplicaReplication.num_keys_per_server=10000
 -Dhbase.IntegrationTestRegionReplicaReplication.runtime=600000
 -DIntegrationTestRegionReplicaReplication.read_delay_ms=5000
 -DIntegrationTestRegionReplicaReplication.region_replication=3
 -DIntegrationTestRegionReplicaReplication.region_replica_id=2
 -DIntegrationTestRegionReplicaReplication.num_read_threads=100
 -DIntegrationTestRegionReplicaReplication.num_write_threads=100