You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2015/05/10 23:06:20 UTC
[2/9] accumulo git commit: ACCUMULO-3790 Ensure replication table is
online before test proceeds
ACCUMULO-3790 Ensure replication table is online before test proceeds
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/671d4da1
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/671d4da1
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/671d4da1
Branch: refs/heads/master
Commit: 671d4da164994a9c0025b246245b8385468778ea
Parents: 2cde562
Author: Josh Elser <el...@apache.org>
Authored: Sat May 9 20:52:29 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sat May 9 20:52:29 2015 -0400
----------------------------------------------------------------------
.../replication/MultiInstanceReplicationIT.java | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/671d4da1/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index 3912e98..7dd31c0 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -225,6 +225,11 @@ public class MultiInstanceReplicationIT extends ConfigurableMacIT {
Iterators.size(ReplicationTable.getScanner(connMaster).iterator());
log.info("TabletServer is online");
+ while (!ReplicationTable.isOnline(connMaster)) {
+ log.info("Replication table still offline, waiting");
+ Thread.sleep(5000);
+ }
+
log.info("");
log.info("Fetching metadata records:");
for (Entry<Key,Value> kv : connMaster.createScanner(MetadataTable.NAME, Authorizations.EMPTY)) {
@@ -409,6 +414,11 @@ public class MultiInstanceReplicationIT extends ConfigurableMacIT {
// Read the data -- the tserver is back up and running
Iterators.size(connMaster.createScanner(masterTable1, Authorizations.EMPTY).iterator());
+ while (!ReplicationTable.isOnline(connMaster)) {
+ log.info("Replication table still offline, waiting");
+ Thread.sleep(5000);
+ }
+
// Wait for both tables to be replicated
log.info("Waiting for {} for {}", filesFor1, masterTable1);
connMaster.replicationOperations().drain(masterTable1, filesFor1);
@@ -516,6 +526,11 @@ public class MultiInstanceReplicationIT extends ConfigurableMacIT {
cluster.exec(TabletServer.class);
+ while (!ReplicationTable.isOnline(connMaster)) {
+ log.info("Replication table still offline, waiting");
+ Thread.sleep(5000);
+ }
+
Iterators.size(connMaster.createScanner(masterTable, Authorizations.EMPTY).iterator());
for (Entry<Key,Value> kv : ReplicationTable.getScanner(connMaster)) {
@@ -638,6 +653,11 @@ public class MultiInstanceReplicationIT extends ConfigurableMacIT {
cluster.exec(TabletServer.class);
+ while (!ReplicationTable.isOnline(connMaster)) {
+ log.info("Replication table still offline, waiting");
+ Thread.sleep(5000);
+ }
+
// Wait until we fully replicated something
boolean fullyReplicated = false;
for (int i = 0; i < 10 && !fullyReplicated; i++) {