@Test
  public void testSyncUpTool() throws Exception {
    // Set up Replication: on Master and one Slave
    // Table: t1_syncup and t2_syncup
    // columnfamily:
    // 'cf1' : replicated
    // 'norep': not replicated
    setupReplication();

    //
    // at Master:
    // t1_syncup: put 100 rows into cf1, and 1 rows into norep
    // t2_syncup: put 200 rows into cf1, and 1 rows into norep
    //
    // verify correctly replicated to slave
    putAndReplicateRows();

    // Verify delete works
    //
    // step 1: stop hbase on Slave
    //
    // step 2: at Master:
    // t1_syncup: delete 50 rows from cf1
    // t2_syncup: delete 100 rows from cf1
    // no change on 'norep'
    //
    // step 3: stop hbase on master, restart hbase on Slave
    //
    // step 4: verify Slave still have the rows before delete
    // t1_syncup: 100 rows from cf1
    // t2_syncup: 200 rows from cf1
    //
    // step 5: run syncup tool on Master
    //
    // step 6: verify that delete show up on Slave
    // t1_syncup: 50 rows from cf1
    // t2_syncup: 100 rows from cf1
    //
    // verify correctly replicated to Slave
    mimicSyncUpAfterDelete();

    // Verify put works
    //
    // step 1: stop hbase on Slave
    //
    // step 2: at Master:
    // t1_syncup: put 100 rows from cf1
    // t2_syncup: put 200 rows from cf1
    // and put another row on 'norep'
    // ATTN:
    // put to 'cf1' will overwrite existing rows, so end count will be 100 and 200 respectively
    // put to 'norep' will add a new row.
    //
    // step 3: stop hbase on master, restart hbase on Slave
    //
    // step 4: verify Slave still has the rows before put
    // t1_syncup: 50 rows from cf1
    // t2_syncup: 100 rows from cf1
    //
    // step 5: run syncup tool on Master
    //
    // step 6: verify that put show up on Slave and 'norep' does not
    // t1_syncup: 100 rows from cf1
    // t2_syncup: 200 rows from cf1
    //
    // verify correctly replicated to Slave
    mimicSyncUpAfterPut();
  }
Add a row to a table in each cluster, check it's replicated, delete it, check's gone Also check
the puts and deletes are not replicated back to the originating cluster.
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationSyncUpTool.java