accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject accumulo git commit: ACCUMULO-3699 more timing-related tweaks
Date Mon, 30 Mar 2015 12:40:16 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master b0e1a81cf -> 94bd393e0


ACCUMULO-3699 more timing-related tweaks


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

Branch: refs/heads/master
Commit: 94bd393e0a1eab4a95bdfb37ddebd9036a43c764
Parents: b0e1a81
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Mon Mar 30 08:40:06 2015 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Mon Mar 30 08:40:06 2015 -0400

----------------------------------------------------------------------
 .../minicluster/impl/MiniAccumuloClusterImpl.java     | 10 ++++++++--
 .../org/apache/accumulo/proxy/SimpleProxyBase.java    |  7 ++++---
 .../accumulo/test/functional/ClassLoaderIT.java       |  4 +++-
 .../apache/accumulo/test/functional/DurabilityIT.java |  2 --
 .../accumulo/test/functional/KerberosProxyIT.java     | 14 ++++++++++++--
 .../test/functional/WatchTheWatchCountIT.java         |  2 +-
 .../accumulo/test/replication/ReplicationIT.java      |  2 +-
 7 files changed, 29 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
index 411c5e0..919d5aa 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java
@@ -287,8 +287,14 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster {
     for (Entry<String,String> sysProp : config.getSystemProperties().entrySet()) {
       argList.add(String.format("-D%s=%s", sysProp.getKey(), sysProp.getValue()));
     }
-    argList.addAll(Arrays.asList("-XX:+UseConcMarkSweepGC", "-XX:CMSInitiatingOccupancyFraction=75",
"-Dapple.awt.UIElement=true",
-        "-Djava.net.preferIPv4Stack=true", Main.class.getName(), className));
+    argList.addAll(Arrays.asList(
+        "-XX:+UseConcMarkSweepGC",
+        "-XX:CMSInitiatingOccupancyFraction=75",
+        "-Dapple.awt.UIElement=true",
+        "-Djava.net.preferIPv4Stack=true",
+        "-XX:+PerfDisableSharedMem",
+        "-XX:+AlwaysPreTouch",
+        Main.class.getName(), className));
     argList.addAll(Arrays.asList(args));
 
     ProcessBuilder builder = new ProcessBuilder(argList);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
index 4c3f55c..d124ce9 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
@@ -116,6 +116,7 @@ import com.google.common.net.HostAndPort;
  */
 public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
+  private static final long ZOOKEEPER_PROPAGATION_TIME = 10 * 1000;
   private TServer proxyServer;
   private int proxyPort;
   private org.apache.accumulo.proxy.thrift.AccumuloProxy.Client client;
@@ -973,7 +974,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
     client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
     // zookeeper propagation time
-    UtilWaitThread.sleep(5 * 1000);
+    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
     WriterOptions writerOptions = new WriterOptions();
     writerOptions.setLatencyMs(10000);
@@ -1028,7 +1029,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(2, client.listConstraints(creds, TABLE_TEST).size());
 
     // zookeeper propagation time
-    UtilWaitThread.sleep(5 * 1000);
+    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
     client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "123"));
 
@@ -1231,7 +1232,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
 
     client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
-    UtilWaitThread.sleep(5*1000);
+    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
     String cwid = client.createConditionalWriter(creds, TABLE_TEST, new ConditionalWriterOptions());
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
index 092bfbc..4b51bd2 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ClassLoaderIT.java
@@ -49,6 +49,8 @@ import org.junit.Test;
 
 public class ClassLoaderIT extends AccumuloClusterIT {
 
+  private static final long ZOOKEEPER_PROPAGATION_TIME = 10 * 1000;
+
   @Override
   protected int defaultTimeoutSeconds() {
     return 2 * 60;
@@ -81,7 +83,7 @@ public class ClassLoaderIT extends AccumuloClusterIT {
     IteratorSetting is = new IteratorSetting(10, "TestCombiner", "org.apache.accumulo.test.functional.TestCombiner");
     Combiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("cf")));
     c.tableOperations().attachIterator(tableName, is, EnumSet.of(IteratorScope.scan));
-    UtilWaitThread.sleep(5000);
+    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
     scanCheck(c, tableName, "TestX");
     fs.delete(jarPath, true);
     fs.copyFromLocalFile(new Path(System.getProperty("user.dir") + "/src/test/resources/TestCombinerY.jar"),
jarPath);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java
index 7507290..de40718 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java
@@ -30,7 +30,6 @@ import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.minicluster.impl.ProcessReference;
@@ -141,7 +140,6 @@ public class DurabilityIT extends ConfigurableMacIT {
     String tableName = getUniqueNames(1)[0];
     c.tableOperations().create(tableName);
     c.tableOperations().setProperty(tableName, Property.TABLE_DURABILITY.getKey(), "none");
-    UtilWaitThread.sleep(1000);
     writeSome(tableName, N);
     restartTServer();
     assertTrue(N > readSome(tableName));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/test/src/test/java/org/apache/accumulo/test/functional/KerberosProxyIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/KerberosProxyIT.java b/test/src/test/java/org/apache/accumulo/test/functional/KerberosProxyIT.java
index 086c4c1..fda3586 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/KerberosProxyIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/KerberosProxyIT.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.FileWriter;
+import java.io.IOException;
 import java.net.ConnectException;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
@@ -178,9 +179,18 @@ public class KerberosProxyIT extends AccumuloIT {
 
     boolean success = false;
     ClusterUser rootUser = kdc.getRootUser();
-    UserGroupInformation.loginUserFromKeytab(rootUser.getPrincipal(), rootUser.getKeytab().getAbsolutePath());
-    UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
     for (int i = 0; i < 10 && !success; i++) {
+
+      UserGroupInformation ugi;
+      try {
+        UserGroupInformation.loginUserFromKeytab(rootUser.getPrincipal(), rootUser.getKeytab().getAbsolutePath());
+        ugi = UserGroupInformation.getCurrentUser();
+      } catch (IOException ex) {
+        log.info("Login as root is failing", ex);
+        Thread.sleep(1000);
+        continue;
+      }
+
       TSocket socket = new TSocket(hostname, proxyPort);
       log.info("Connecting to proxy with server primary '" + proxyPrimary + "' running on
" + hostname);
       TSaslClientTransport transport = new TSaslClientTransport("GSSAPI", null, proxyPrimary,
hostname, Collections.singletonMap("javax.security.sasl.qop",

http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/test/src/test/java/org/apache/accumulo/test/functional/WatchTheWatchCountIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/WatchTheWatchCountIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/WatchTheWatchCountIT.java
index bd0555b..3b1dd2f 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/WatchTheWatchCountIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/WatchTheWatchCountIT.java
@@ -52,7 +52,7 @@ public class WatchTheWatchCountIT extends ConfigurableMacIT {
       String response = new String(buffer, 0, n);
       long total = Long.parseLong(response.split(":")[1].trim());
       assertTrue("Total watches was not greater than 500, but was " + total, total > 500);
-      assertTrue("Total watches was not less than 600, but was " + total, total < 600);
+      assertTrue("Total watches was not less than 650, but was " + total, total < 600);
     } finally {
       socket.close();
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/94bd393e/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
index f0821e1..46e3ac1 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -1555,7 +1555,7 @@ public class ReplicationIT extends ConfigurableMacIT {
      */
 
     int recordsFound = 0;
-    for (int i = 0; i < 10; i++) {
+    for (int i = 0; i < 30; i++) {
       s = ReplicationTable.getScanner(conn);
       recordsFound = 0;
       for (Entry<Key,Value> entry : s) {


Mime
View raw message