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
Modifier and TypeFieldDescription(package private) IntegrationTestBigLinkedList
private final org.slf4j.Logger
protected IntegrationTestReplication.ClusterID
protected IntegrationTestReplication.ClusterID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
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 clusterprotected void
Run theIntegrationTestBigLinkedList.Generator
in the source cluster.protected void
runVerify
(long expectedNumNodes) Run theIntegrationTestBigLinkedList.Verify
in the sink cluster.protected void
This tears down any tables that existed from before and rebuilds the tables and schemas on the source cluster.protected void
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 theReplicationAdmin
connection.- Throws:
Exception
-
waitForReplication
- Throws:
Exception
-
runGenerator
Run theIntegrationTestBigLinkedList.Generator
in the source cluster. This assumes that the tables have been setup via setupTablesAndReplication.- Throws:
Exception
-
runVerify
Run theIntegrationTestBigLinkedList.Verify
in 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:
run
in interfaceorg.apache.hadoop.util.Tool
- Parameters:
args
- should be empty- Returns:
- 0 on success
- Throws:
Exception
- on an error
-