protected class IntegrationTestReplication.VerifyReplicationLoop extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
IntegrationTestBigLinkedList
for the generation and verification of the linked list. It is heavily based on
IntegrationTestBigLinkedList.Loop
Modifier and Type | Field and Description |
---|---|
(package private) IntegrationTestBigLinkedList |
integrationTestBigLinkedList |
private org.slf4j.Logger |
LOG |
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() |
private final org.slf4j.Logger LOG
protected IntegrationTestReplication.ClusterID source
protected IntegrationTestReplication.ClusterID sink
IntegrationTestBigLinkedList integrationTestBigLinkedList
protected VerifyReplicationLoop()
protected void setupTablesAndReplication() throws Exception
ReplicationAdmin
connection.Exception
protected void waitForReplication() throws Exception
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
run
in interface org.apache.hadoop.util.Tool
args
- should be emptyException
- on an errorCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.