You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2014/03/05 19:31:28 UTC

git commit: Revert "ACCUMULO-2307 purging -ssl directories"

Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 45d2110ed -> b75dcc5b4


Revert "ACCUMULO-2307 purging -ssl directories"

This reverts commit b1f0336dd26d0eb7c2dd0b3635e8556f451418c5.

Conflicts:
	test/src/test/java/org/apache/accumulo/test/functional/SslIT.java


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: b75dcc5b46cba503e99b02ca0211f9b2b889f180
Parents: 45d2110
Author: John Vines <vi...@apache.org>
Authored: Wed Mar 5 13:27:50 2014 -0500
Committer: John Vines <vi...@apache.org>
Committed: Wed Mar 5 13:27:50 2014 -0500

----------------------------------------------------------------------
 .../accumulo/minicluster/impl/MiniAccumuloConfigImpl.java    | 8 +++-----
 .../org/apache/accumulo/test/functional/AbstractMacIT.java   | 8 ++++----
 .../java/org/apache/accumulo/test/functional/BulkIT.java     | 7 +++----
 .../apache/accumulo/test/functional/ConfigurableMacIT.java   | 2 +-
 .../java/org/apache/accumulo/test/functional/ExamplesIT.java | 8 ++++----
 .../org/apache/accumulo/test/functional/SimpleMacIT.java     | 2 +-
 .../test/java/org/apache/accumulo/test/functional/SslIT.java | 4 ++--
 7 files changed, 18 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
index b25aa1f..2962861 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java
@@ -87,10 +87,8 @@ public class MiniAccumuloConfigImpl {
     if (this.getDir().exists() && !this.getDir().isDirectory())
       throw new IllegalArgumentException("Must pass in directory, " + this.getDir() + " is a file");
 
-    String[] dirList;
-    if (this.getDir().exists() && (dirList = this.getDir().list()).length != 0)
-      if (!(dirList.length == 1 && dirList[0].equals("ssl")))
-        throw new IllegalArgumentException("Directory " + this.getDir() + " is not empty");
+    if (this.getDir().exists() && this.getDir().list().length != 0)
+      throw new IllegalArgumentException("Directory " + this.getDir() + " is not empty");
 
     if (!initialized) {
       libDir = new File(dir, "lib");
@@ -384,7 +382,7 @@ public class MiniAccumuloConfigImpl {
   public File getClientConfFile() {
     return new File(getConfDir(), "client.conf");
   }
-
+  
   /**
    * sets system properties set for service processes
    * 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
index 96a7cc9..aab3edb 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/AbstractMacIT.java
@@ -85,20 +85,20 @@ public abstract class AbstractMacIT {
     return names;
   }
 
-  protected static void configureForEnvironment(MiniAccumuloConfigImpl cfg, Class<?> testClass) {
+  protected static void configureForEnvironment(MiniAccumuloConfigImpl cfg, Class<?> testClass, File folder) {
     if ("true".equals(System.getProperty("org.apache.accumulo.test.functional.useSslForIT"))) {
-      configureForSsl(cfg);
+      configureForSsl(cfg, folder);
     }
   }
 
-  protected static void configureForSsl(MiniAccumuloConfigImpl cfg) {
+  protected static void configureForSsl(MiniAccumuloConfigImpl cfg, File folder) {
     Map<String,String> siteConfig = cfg.getSiteConfig();
     if ("true".equals(siteConfig.get(Property.INSTANCE_RPC_SSL_ENABLED.getKey()))) {
       // already enabled; don't mess with it
       return;
     }
 
-    File sslDir = new File(cfg.getDir(), "ssl");
+    File sslDir = new File(folder, "ssl");
     sslDir.mkdirs();
     File rootKeystoreFile = new File(sslDir, "root-" + cfg.getInstanceName() + ".jks");
     File localKeystoreFile = new File(sslDir, "local-" + cfg.getInstanceName() + ".jks");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
index 595957e..2fc0477 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkIT.java
@@ -16,7 +16,6 @@
  */
 package org.apache.accumulo.test.functional;
 
-import java.io.File;
 import java.io.IOException;
 
 import org.apache.accumulo.core.client.AccumuloException;
@@ -40,14 +39,14 @@ public class BulkIT extends SimpleMacIT {
 
   @Test(timeout = 4 * 60 * 1000)
   public void test() throws Exception {
-    runTest(getConnector(), getTableNames(1)[0], this.getClass().getName(), getFolder());
+    runTest(getConnector(), getTableNames(1)[0], this.getClass().getName());
   }
 
-  static void runTest(Connector c, String tableName, String filePrefix, File workingDirectory) throws AccumuloException, AccumuloSecurityException, TableExistsException, IOException, TableNotFoundException,
+  static void runTest(Connector c, String tableName, String filePrefix) throws AccumuloException, AccumuloSecurityException, TableExistsException, IOException, TableNotFoundException,
       MutationsRejectedException {
     c.tableOperations().create(tableName);
     FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
-    String base = workingDirectory.getAbsolutePath();
+    String base = "target/accumulo-maven-plugin";
     fs.delete(new Path(base + "/testrf"), true);
     fs.mkdirs(new Path(base + "/testBulkFail"));
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
index 369bf69..d9bed7f 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
@@ -52,7 +52,7 @@ public class ConfigurableMacIT extends AbstractMacIT {
     Configuration coreSite = new Configuration(false);
     configure(cfg, coreSite);
     cfg.setProperty(Property.TSERV_NATIVEMAP_ENABLED, Boolean.TRUE.toString());
-    configureForEnvironment(cfg, getClass());
+    configureForEnvironment(cfg, getClass(), createSharedTestDir(this.getClass().getName() + "-ssl"));
     cluster = new MiniAccumuloClusterImpl(cfg);
     if (coreSite.size() > 0) {
       File csFile = new File(cluster.getConfig().getConfDir(), "core-site.xml");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
index 824002f..856f663 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
@@ -114,7 +114,7 @@ public class ExamplesIT extends AbstractMacIT {
     cfg.setDefaultMemory(cfg.getDefaultMemory() * 2, MemoryUnit.BYTE);
 
     cfg.setProperty(Property.TSERV_NATIVEMAP_ENABLED, Boolean.TRUE.toString());
-    configureForEnvironment(cfg, ExamplesIT.class);
+    configureForEnvironment(cfg, ExamplesIT.class, createSharedTestDir(ExamplesIT.class.getName() + "-ssl"));
     cluster = new MiniAccumuloClusterImpl(cfg);
     cluster.start();
 
@@ -246,7 +246,7 @@ public class ExamplesIT extends AbstractMacIT {
     assertFalse("Iterator had additional results", iter.hasNext());
   }
 
-  @Test(timeout = 90 * 1000)
+  @Test(timeout = 50 * 1000)
   public void testBloomFilters() throws Exception {
     c.tableOperations().create("bloom_test");
     c.tableOperations().setProperty("bloom_test", Property.TABLE_BLOOM_ENABLED.getKey(), "true");
@@ -360,7 +360,7 @@ public class ExamplesIT extends AbstractMacIT {
     goodExec(RowOperations.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd);
   }
 
-  @Test(timeout = 30 * 1000)
+  @Test(timeout = 15 * 1000)
   public void testBatchWriter() throws Exception {
     c.tableOperations().create("test");
     goodExec(SequentialBatchWriter.class, "-i", instance, "-z", keepers, "-u", user, "-p", passwd, "-t", "test", "--start", "0", "--num", "100000", "--size",
@@ -377,7 +377,7 @@ public class ExamplesIT extends AbstractMacIT {
 
   }
 
-  @Test(timeout = 90 * 1000)
+  @Test(timeout = 50 * 1000)
   public void testRandomBatchesAndFlush() throws Exception {
     String test3 = "test3";
     c.tableOperations().create(test3);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
index da265cb..0bfc991 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/SimpleMacIT.java
@@ -44,7 +44,7 @@ public class SimpleMacIT extends AbstractMacIT {
       MiniAccumuloConfigImpl cfg = new MiniAccumuloConfigImpl(folder, ROOT_PASSWORD);
       cfg.setNativeLibPaths(NativeMapIT.nativeMapLocation().getAbsolutePath());
       cfg.setProperty(Property.TSERV_NATIVEMAP_ENABLED, Boolean.TRUE.toString());
-      configureForEnvironment(cfg, SimpleMacIT.class);
+      configureForEnvironment(cfg, SimpleMacIT.class, createSharedTestDir(SimpleMacIT.class.getName() + "-ssl"));
       cluster = new MiniAccumuloClusterImpl(cfg);
       cluster.start();
       Runtime.getRuntime().addShutdownHook(new Thread() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b75dcc5b/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
index 25868c3..1f0c811 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/SslIT.java
@@ -31,7 +31,7 @@ public class SslIT extends ConfigurableMacIT {
   @Override
   public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
     super.configure(cfg, hadoopCoreSite);
-    configureForSsl(cfg);
+    configureForSsl(cfg, createSharedTestDir(this.getClass().getName() + "-ssl"));
   }
 
   @Test(timeout = 60 * 1000)
@@ -52,7 +52,7 @@ public class SslIT extends ConfigurableMacIT {
 
   @Test(timeout = 5 * 60 * 1000)
   public void bulk() throws Exception {
-    BulkIT.runTest(getConnector(), getTableNames(1)[0], this.getClass().getName(), cluster.getConfig().getDir());
+    BulkIT.runTest(getConnector(), getTableNames(1)[0], this.getClass().getName());
   }
 
   @Test(timeout = 60 * 1000)