accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [03/10] accumulo git commit: ACCUMULO-3147 Create replication table at initialize, upgrade
Date Fri, 07 Nov 2014 22:31:18 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e840549a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
index edd49ab..ad9c9fc 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
@@ -54,7 +54,6 @@ import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.minicluster.impl.ProcessReference;
-import org.apache.accumulo.server.replication.ReplicationUtil;
 import org.apache.accumulo.test.functional.ConfigurableMacIT;
 import org.apache.accumulo.tserver.TabletServer;
 import org.apache.accumulo.tserver.replication.AccumuloReplicaSystem;
@@ -168,7 +167,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
       final Connector connMaster = getConnector();
       final Connector connPeer = peerCluster.getConnector("root", ROOT_PASSWORD);
 
-      ReplicationUtil.createReplicationTable(connMaster);
+      ReplicationTable.setOnline(connMaster);
 
       String peerUserName = "peer", peerPassword = "foo";
 
@@ -243,7 +242,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
 
       log.info("");
       log.info("Fetching replication records:");
-      for (Entry<Key,Value> kv : connMaster.createScanner(ReplicationTable.NAME, Authorizations.EMPTY))
{
+      for (Entry<Key,Value> kv : ReplicationTable.getScanner(connMaster)) {
         log.info(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
       }
 
@@ -280,7 +279,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
 
       log.info("");
       log.info("Fetching replication records:");
-      for (Entry<Key,Value> kv : connMaster.createScanner(ReplicationTable.NAME, Authorizations.EMPTY))
{
+      for (Entry<Key,Value> kv : ReplicationTable.getScanner(connMaster)) {
         log.info(kv.getKey().toStringNoTruncate() + " " + ProtobufUtil.toString(Status.parseFrom(kv.getValue().get())));
       }
 
@@ -404,7 +403,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
       Set<String> filesFor1 = connMaster.replicationOperations().referencedFiles(masterTable1),
filesFor2 = connMaster.replicationOperations().referencedFiles(
           masterTable2);
 
-      while (!connMaster.tableOperations().exists(ReplicationTable.NAME)) {
+      while (!ReplicationTable.isOnline(connMaster)) {
         Thread.sleep(500);
       }
 
@@ -658,7 +657,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
 
       log.info("Wrote all data to master cluster");
 
-      while (!connMaster.tableOperations().exists(ReplicationTable.NAME)) {
+      while (!ReplicationTable.isOnline(connMaster)) {
         Thread.sleep(500);
       }
 


Mime
View raw message