protected class IntegrationTestReplication.VerifyReplicationLoop
extends Configured
IntegrationTestBigLinkedList
for the generation and verification of the linked list. It is heavily based on
IntegrationTestBigLinkedList.Loop
Modifier and Type | Field and Description |
---|---|
protected IntegrationTestReplication.ClusterID |
sink |
protected IntegrationTestReplication.ClusterID |
source |
Modifier | Constructor and Description |
---|---|
protected |
VerifyReplicationLoop() |
Modifier and Type | Method and Description |
---|---|
int |
run(String[] args)
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
|
protected void |
runGenerator()
Run the
IntegrationTestBigLinkedList.Generator in the
source cluster. |
protected void |
runVerify(long expectedNumNodes)
Run the
IntegrationTestBigLinkedList.Verify
in the sink cluster. |
protected void |
setupTablesAndReplication()
This tears down any tables that existed from before and rebuilds the tables and schemas on
the source cluster.
|
protected void |
waitForReplication() |
protected IntegrationTestReplication.ClusterID source
protected IntegrationTestReplication.ClusterID sink
protected void setupTablesAndReplication() throws Exception
ReplicationAdmin
connection.Exception
protected void runGenerator() throws Exception
IntegrationTestBigLinkedList.Generator
in the
source cluster. This assumes that the tables have been setup via setupTablesAndReplication.Exception
protected void runVerify(long expectedNumNodes) throws Exception
IntegrationTestBigLinkedList.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 gapexpectedNumNodes
- the number of nodes we are expecting to see in the sink clusterException
public int run(String[] args) throws Exception
args
- should be emptyException
- on an error