Package org.apache.hadoop.hbase.client.replication

Examples of org.apache.hadoop.hbase.client.replication.ReplicationAdmin.addPeer()


    // now roll the region server's logs
    new HBaseAdmin(conf1).rollHLogWriter(master.getRegionServer(0).getServerName().toString());
    // after the log was rolled put a new row
    putAndWait(row3, famName, htable1, htable2);

    admin1.addPeer("2", utility3.getClusterKey());

    // put a row, check it was replicated to all clusters
    putAndWait(row1, famName, htable1, htable2, htable3);
    // delete and verify
    deleteAndWait(row1, htable1, htable2, htable3);
View Full Code Here


    HTable htable3 = new HTable(conf3, tableName);
    htable3.setWriteBufferSize(1024);
   
    admin1.addPeer("1", utility2.getClusterKey());
    admin2.addPeer("1", utility3.getClusterKey());
    admin3.addPeer("1", utility1.getClusterKey());

    // put "row" and wait 'til it got around
    putAndWait(row, famName, htable1, htable3);
    // it should have passed through table2
    check(row,famName,htable2);
View Full Code Here

    HTable htable2 = new HTable(conf2, tableName);
    htable2.setWriteBufferSize(1024);

    // set M-M
    admin1.addPeer("1", utility2.getClusterKey());
    admin2.addPeer("1", utility1.getClusterKey());

    // add rows to both clusters,
    // make sure they are both replication
    putAndWait(row, famName, htable1, htable2);
    putAndWait(row1, famName, htable2, htable1);
View Full Code Here

    HTable htable3 = new HTable(conf3, tableName);
    htable3.setWriteBufferSize(1024);
   
    admin1.addPeer("1", clusterKey2);
    admin2.addPeer("1", clusterKey3);
    admin3.addPeer("1", clusterKey1);

    // put "row" and wait 'til it got around
    putAndWait(row, famName, htable1, htable3);
    // it should have passed through table2
    check(row,famName,htable2);
View Full Code Here

    HTable htable2 = new HTable(conf2, tableName);
    htable2.setWriteBufferSize(1024);

    // set M-M
    admin1.addPeer("1", clusterKey2);
    admin2.addPeer("1", clusterKey1);

    // add rows to both clusters,
    // make sure they are both replication
    putAndWait(row, famName, htable1, htable2);
    putAndWait(row1, famName, htable2, htable1);
View Full Code Here

    HTable htable2 = new HTable(conf2, tableName);
    htable2.setWriteBufferSize(1024);
    HTable htable3 = new HTable(conf3, tableName);
    htable3.setWriteBufferSize(1024);
   
    admin1.addPeer("1", utility2.getClusterKey());

    // put "row" and wait 'til it got around, then delete
    putAndWait(row, famName, htable1, htable2);
    deleteAndWait(row, htable1, htable2);
    // check it wasn't replication to cluster 3
View Full Code Here

    // now roll the region server's logs
    new HBaseAdmin(conf1).rollHLogWriter(master.getRegionServer(0).getServerName().toString());
    // after the log was rolled put a new row
    putAndWait(row3, famName, htable1, htable2);

    admin1.addPeer("2", utility3.getClusterKey());

    // put a row, check it was replicated to all clusters
    putAndWait(row1, famName, htable1, htable2, htable3);
    // delete and verify
    deleteAndWait(row1, htable1, htable2, htable3);
View Full Code Here

    HTable htable3 = new HTable(conf3, tableName);
    htable3.setWriteBufferSize(1024);
   
    admin1.addPeer("1", utility2.getClusterKey());
    admin2.addPeer("1", utility3.getClusterKey());
    admin3.addPeer("1", utility1.getClusterKey());

    // put "row" and wait 'til it got around
    putAndWait(row, famName, htable1, htable3);
    // it should have passed through table2
    check(row,famName,htable2);
View Full Code Here

    HTable htable2 = new HTable(conf2, tableName);
    htable2.setWriteBufferSize(1024);

    // set M-M
    admin1.addPeer("1", utility2.getClusterKey());
    admin2.addPeer("1", utility1.getClusterKey());

    // add rows to both clusters,
    // make sure they are both replication
    putAndWait(row, famName, htable1, htable2);
    putAndWait(row1, famName, htable2, htable1);
View Full Code Here

    Table htab1C = new HTable(conf1, tabCName);
    Table htab2C = new HTable(conf2, tabCName);
    Table htab3C = new HTable(conf3, tabCName);

    // A. add cluster2/cluster3 as peers to cluster1
    admin1.addPeer("2", utility2.getClusterKey(), "TC;TB:f1,f3");
    admin1.addPeer("3", utility3.getClusterKey(), "TA;TB:f1,f2");

    // A1. tableA can only replicated to cluster3
    putAndWaitWithFamily(row1, f1Name, htab1A, htab3A);
    ensureRowNotReplicated(row1, f1Name, htab2A);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.