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 2014/12/02 21:36:53 UTC

[05/50] [abbrv] accumulo git commit: ACCUMULO-3167 Try to stabilize SplitIT more.

ACCUMULO-3167 Try to stabilize SplitIT more.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1a578958
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1a578958
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1a578958

Branch: refs/heads/metrics2
Commit: 1a578958d9aca1033460b6636a5c7824ad1742ed
Parents: a16b7af
Author: Josh Elser <el...@apache.org>
Authored: Fri Nov 21 11:54:42 2014 -0500
Committer: Josh Elser <el...@apache.org>
Committed: Mon Nov 24 18:08:17 2014 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/test/functional/SplitIT.java | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1a578958/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
index 9eab5eb..66d80fa 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/SplitIT.java
@@ -74,6 +74,10 @@ public class SplitIT extends AccumuloClusterIT {
 
   @Before
   public void alterConfig() throws Exception {
+    if (ClusterType.MINI == getClusterType()) {
+      return;
+    }
+
     InstanceOperations iops = getConnector().instanceOperations();
     Map<String,String> config = iops.getSystemConfiguration();
     tservMaxMem = config.get(Property.TSERV_MAXMEM.getKey());
@@ -107,6 +111,8 @@ public class SplitIT extends AccumuloClusterIT {
       log.info("Resetting {}={}", Property.TSERV_MAXMEM.getKey(), tservMaxMem);
       getConnector().instanceOperations().setProperty(Property.TSERV_MAXMEM.getKey(), tservMaxMem);
       tservMaxMem = null;
+      getCluster().getClusterControl().stopAllServers(ServerType.TABLET_SERVER);
+      getCluster().getClusterControl().startAllServers(ServerType.TABLET_SERVER);
     }
     if (null != tservMajcDelay) {
       log.info("Resetting {}={}", Property.TSERV_MAJC_DELAY.getKey(), tservMajcDelay);
@@ -130,7 +136,9 @@ public class SplitIT extends AccumuloClusterIT {
     vopts.rows = opts.rows;
     vopts.tableName = table;
     VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
-    UtilWaitThread.sleep(15 * 1000);
+    while (c.tableOperations().listSplits(table).size() < 10) {
+      UtilWaitThread.sleep(15 * 1000);
+    }
     String id = c.tableOperations().tableIdMap().get(table);
     Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
     KeyExtent extent = new KeyExtent(new Text(id), null, null);
@@ -164,6 +172,11 @@ public class SplitIT extends AccumuloClusterIT {
     ReadWriteIT.interleaveTest(c, tableName);
     UtilWaitThread.sleep(5 * 1000);
     int numSplits = c.tableOperations().listSplits(tableName).size();
+    while (numSplits <= 20) {
+      log.info("Waiting for splits to happen");
+      Thread.sleep(2000);
+      numSplits = c.tableOperations().listSplits(tableName).size();
+    }
     assertTrue("Expected at least 20 splits, saw " + numSplits, numSplits > 20);
   }