Package org.apache.hadoop.hbase.test
Class IntegrationTestReplication.VerifyReplicationLoop
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.test.IntegrationTestReplication.VerifyReplicationLoop
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
- Enclosing class:
- IntegrationTestReplication
protected class IntegrationTestReplication.VerifyReplicationLoop
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
The main runner loop for the test. It uses
IntegrationTestBigLinkedList for the generation and
verification of the linked list. It is heavily based on
IntegrationTestBigLinkedList.Loop-
Field Summary
FieldsModifier and TypeFieldDescription(package private) IntegrationTestBigLinkedListprivate final org.slf4j.Loggerprotected IntegrationTestReplication.ClusterIDprotected IntegrationTestReplication.ClusterID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe main test runner This test has 4 steps: 1: setupTablesAndReplication 2: generate the data into the source cluster 3: wait for replication to propagate 4: verify that the data is available in the sink clusterprotected voidRun theIntegrationTestBigLinkedList.Generatorin the source cluster.protected voidrunVerify(long expectedNumNodes) Run theIntegrationTestBigLinkedList.Verifyin the sink cluster.protected voidThis tears down any tables that existed from before and rebuilds the tables and schemas on the source cluster.protected voidMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
source
-
sink
-
integrationTestBigLinkedList
-
-
Constructor Details
-
VerifyReplicationLoop
protected VerifyReplicationLoop()
-
-
Method Details
-
setupTablesAndReplication
This tears down any tables that existed from before and rebuilds the tables and schemas on the source cluster. It then sets up replication from the source to the sink cluster by using theAdminconnection.- Throws:
Exception
-
waitForReplication
- Throws:
Exception
-
runGenerator
Run theIntegrationTestBigLinkedList.Generatorin the source cluster. This assumes that the tables have been setup via setupTablesAndReplication.- Throws:
Exception
-
runVerify
Run theIntegrationTestBigLinkedList.Verifyin the sink cluster. If replication is working properly the data written at the source cluster should be available in the sink cluster after a reasonable gap- Parameters:
expectedNumNodes- the number of nodes we are expecting to see in the sink cluster- Throws:
Exception
-
run
The main test runner This test has 4 steps: 1: setupTablesAndReplication 2: generate the data into the source cluster 3: wait for replication to propagate 4: verify that the data is available in the sink cluster- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Parameters:
args- should be empty- Returns:
- 0 on success
- Throws:
Exception- on an error
-