[accumulo] 01/01: Merge branch '1.9'
This is an automated email from the ASF dual-hosted git repository. elserj pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git commit c35f17f5354340ee6da773d84c42fee017f8bb81 Merge: 5af231f 159c97a Author: Josh Elser AuthorDate: Mon Sep 24 17:54:34 2018 -0400 Merge branch '1.9' .../java/org/apache/accumulo/core/conf/Property.java | 4 .../org/apache/accumulo/monitor/EmbeddedWebServer.java | 18 -- 2 files changed, 16 insertions(+), 6 deletions(-) diff --cc server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java index ee2ebaa,e8309be..69222ab --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java @@@ -42,29 -49,23 +42,35 @@@ public class EmbeddedWebServer public EmbeddedWebServer(String host, int port) { server = new Server(); final AccumuloConfiguration conf = Monitor.getContext().getConfiguration(); -if (EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTORE)) -|| EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTOREPASS)) -|| EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTORE)) -|| EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS))) { +connector = new ServerConnector(server, getConnectionFactories(conf)); +connector.setHost(host); +connector.setPort(port); + +handler = new ServletContextHandler( +ServletContextHandler.SESSIONS | ServletContextHandler.SECURITY); +handler.getSessionHandler().getSessionCookieConfig().setHttpOnly(true); +handler.setContextPath("/"); + } + + private static AbstractConnectionFactory[] getConnectionFactories(AccumuloConfiguration conf) { +HttpConnectionFactory httpFactory = new HttpConnectionFactory(); +EnumSet requireForSecure = EnumSet.of(Property.MONITOR_SSL_KEYSTORE, - Property.MONITOR_SSL_KEYSTOREPASS, Property.MONITOR_SSL_TRUSTSTORE); ++Property.MONITOR_SSL_KEYSTOREPASS, Property.MONITOR_SSL_TRUSTSTORE, ++Property.MONITOR_SSL_TRUSTSTOREPASS); + +if (requireForSecure.stream().map(p -> conf.get(p)).anyMatch(s -> s == null || s.isEmpty())) { + LOG.debug("Not configuring Jetty to use TLS"); - connector = new ServerConnector(server, new HttpConnectionFactory()); - usingSsl = false; + return new AbstractConnectionFactory[] {httpFactory}; } else { - final String trustStorePass = conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS); - if (trustStorePass.isEmpty()) { - LOG.warn("Truststore JKS file has an empty password which prevents any integrity checks."); + LOG.debug("Configuring Jetty to use TLS"); + final SslContextFactory sslContextFactory = new SslContextFactory(); + // If the key password is the same as the keystore password, we don't + // have to explicitly set it. Thus, if the user doesn't provide a key + // password, don't set anything. + final String keyPass = conf.get(Property.MONITOR_SSL_KEYPASS); + if (!Property.MONITOR_SSL_KEYPASS.getDefaultValue().equals(keyPass)) { + sslContextFactory.setKeyManagerPassword(keyPass); } - SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setKeyStorePath(conf.get(Property.MONITOR_SSL_KEYSTORE)); sslContextFactory.setKeyStorePassword(conf.get(Property.MONITOR_SSL_KEYSTOREPASS)); sslContextFactory.setKeyStoreType(conf.get(Property.MONITOR_SSL_KEYSTORETYPE));
[accumulo] branch master updated (5af231f -> c35f17f)
This is an automated email from the ASF dual-hosted git repository. elserj pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git. from 5af231f Updates for standalone cluster (#657) add 6933ddb Revert "Do not require a password on the truststore JKS" add 159c97a Introduce a property for a key password for the Monitor keystore file new c35f17f Merge branch '1.9' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../java/org/apache/accumulo/core/conf/Property.java | 4 .../org/apache/accumulo/monitor/EmbeddedWebServer.java | 18 -- 2 files changed, 16 insertions(+), 6 deletions(-)
[accumulo] branch 1.9 updated (a590a0f -> 159c97a)
This is an automated email from the ASF dual-hosted git repository. elserj pushed a change to branch 1.9 in repository https://gitbox.apache.org/repos/asf/accumulo.git. from a590a0f Roll back maven-invoker-plugin 3.1.0->3.0.1 add 6933ddb Revert "Do not require a password on the truststore JKS" add 159c97a Introduce a property for a key password for the Monitor keystore file No new revisions were added by this update. Summary of changes: .../java/org/apache/accumulo/core/conf/Property.java | 4 .../org/apache/accumulo/monitor/EmbeddedWebServer.java | 18 -- 2 files changed, 16 insertions(+), 6 deletions(-)
[accumulo-testing] branch master updated: Replace Connector with AccumuloClient (#34)
This is an automated email from the ASF dual-hosted git repository. mmiller pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git The following commit(s) were added to refs/heads/master by this push: new 27216f4 Replace Connector with AccumuloClient (#34) 27216f4 is described below commit 27216f4a09995a0978d9901b7515bbd14b9de82f Author: Mike Miller AuthorDate: Mon Sep 24 14:29:32 2018 -0400 Replace Connector with AccumuloClient (#34) --- .../accumulo/testing/core/continuous/UndefinedAnalyzer.java | 3 ++- .../accumulo/testing/core/ingest/BulkImportDirectory.java| 2 +- .../org/apache/accumulo/testing/core/ingest/TestIngest.java | 9 + .../apache/accumulo/testing/core/ingest/VerifyIngest.java| 5 +++-- .../accumulo/testing/core/merkle/cli/CompareTables.java | 8 .../accumulo/testing/core/merkle/cli/ComputeRootHash.java| 7 --- .../accumulo/testing/core/merkle/cli/GenerateHashes.java | 9 + .../accumulo/testing/core/merkle/cli/ManualComparison.java | 3 ++- .../accumulo/testing/core/merkle/ingest/RandomWorkload.java | 5 +++-- .../testing/core/performance/impl/PerfTestRunner.java| 6 -- .../apache/accumulo/testing/core/randomwalk/bulk/Verify.java | 2 +- .../testing/core/randomwalk/concurrent/Replication.java | 8 .../apache/accumulo/testing/core/randomwalk/shard/Merge.java | 3 ++- .../org/apache/accumulo/testing/core/scalability/Ingest.java | 8 .../apache/accumulo/testing/core/scalability/ScaleTest.java | 12 +--- .../java/org/apache/accumulo/testing/core/stress/Scan.java | 3 ++- .../java/org/apache/accumulo/testing/core/stress/Write.java | 3 ++- .../testing/core/randomwalk/ReplicationRandomWalkIT.java | 2 +- 18 files changed, 54 insertions(+), 44 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/testing/core/continuous/UndefinedAnalyzer.java b/core/src/main/java/org/apache/accumulo/testing/core/continuous/UndefinedAnalyzer.java index 30eae92..70df0c0 100644 --- a/core/src/main/java/org/apache/accumulo/testing/core/continuous/UndefinedAnalyzer.java +++ b/core/src/main/java/org/apache/accumulo/testing/core/continuous/UndefinedAnalyzer.java @@ -36,6 +36,7 @@ import java.util.TreeMap; import java.util.concurrent.TimeUnit; import org.apache.accumulo.core.cli.BatchScannerOpts; +import org.apache.accumulo.core.client.AccumuloClient; import org.apache.accumulo.core.client.BatchScanner; import org.apache.accumulo.core.client.Connector; import org.apache.accumulo.core.data.Key; @@ -280,7 +281,7 @@ public class UndefinedAnalyzer { undefs.add(new UndefinedNode(undef, ref)); } -Connector conn = opts.getConnector(); +AccumuloClient conn = opts.getClient(); BatchScanner bscanner = conn.createBatchScanner(opts.getTableName(), opts.auths, bsOpts.scanThreads); bscanner.setTimeout(bsOpts.scanTimeout, TimeUnit.MILLISECONDS); List refs = new ArrayList<>(); diff --git a/core/src/main/java/org/apache/accumulo/testing/core/ingest/BulkImportDirectory.java b/core/src/main/java/org/apache/accumulo/testing/core/ingest/BulkImportDirectory.java index a189eda..e5617c4 100644 --- a/core/src/main/java/org/apache/accumulo/testing/core/ingest/BulkImportDirectory.java +++ b/core/src/main/java/org/apache/accumulo/testing/core/ingest/BulkImportDirectory.java @@ -43,6 +43,6 @@ public class BulkImportDirectory { opts.parseArgs(BulkImportDirectory.class.getName(), args); fs.delete(new Path(opts.failures), true); fs.mkdirs(new Path(opts.failures)); -opts.getConnector().tableOperations().importDirectory(opts.getTableName(), opts.source, opts.failures, false); +opts.getClient().tableOperations().importDirectory(opts.getTableName(), opts.source, opts.failures, false); } } diff --git a/core/src/main/java/org/apache/accumulo/testing/core/ingest/TestIngest.java b/core/src/main/java/org/apache/accumulo/testing/core/ingest/TestIngest.java index d30120d..2d43bee 100644 --- a/core/src/main/java/org/apache/accumulo/testing/core/ingest/TestIngest.java +++ b/core/src/main/java/org/apache/accumulo/testing/core/ingest/TestIngest.java @@ -26,6 +26,7 @@ import java.util.TreeSet; import org.apache.accumulo.core.cli.BatchWriterOpts; import org.apache.accumulo.core.cli.ClientOnDefaultTable; +import org.apache.accumulo.core.client.AccumuloClient; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.BatchWriter; @@ -110,7 +111,7 @@ public class TestIngest { } } - public static void createTable(Connector conn, Opts args) throws AccumuloException, AccumuloSecurityException, TableExistsException { + public static void createTable(AccumuloClient conn, Opts args) throws AccumuloException, AccumuloSecurityException, TableExistsException { if
[accumulo] branch master updated: Updates for standalone cluster (#657)
This is an automated email from the ASF dual-hosted git repository. mwalch pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/master by this push: new 5af231f Updates for standalone cluster (#657) 5af231f is described below commit 5af231fab5d2fd5f52eb9260c4cf452b47b1e49a Author: Mike Walch AuthorDate: Mon Sep 24 11:01:04 2018 -0400 Updates for standalone cluster (#657) --- TESTING.md | 1 + .../java/org/apache/accumulo/harness/AccumuloClusterHarness.java| 6 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/TESTING.md b/TESTING.md index 6b7e389..322759e 100644 --- a/TESTING.md +++ b/TESTING.md @@ -111,6 +111,7 @@ To execute everything except these tests, use `mvn verify -Dfailsafe.excludedGro The following properties can be used to configure a standalone cluster: - `accumulo.it.cluster.type`, Required: The type of cluster is being defined (valid options: MINI and STANDALONE) +- `accumulo.it.cluster.clientconf`, Required: Path to accumulo-client.properties - `accumulo.it.cluster.standalone.admin.principal`, Required: Standalone cluster principal (user) with all System permissions - `accumulo.it.cluster.standalone.admin.password`, Required: Password for the principal (only valid w/o Kerberos) - `accumulo.it.cluster.standalone.admin.keytab`, Required: Keytab for the principal (only valid w/ Kerberos) diff --git a/test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java b/test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java index 16ffedb..7807fc8 100644 --- a/test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java +++ b/test/src/main/java/org/apache/accumulo/harness/AccumuloClusterHarness.java @@ -137,7 +137,7 @@ public abstract class AccumuloClusterHarness extends AccumuloITBase (StandaloneAccumuloClusterConfiguration) clusterConf; // @formatter:on StandaloneAccumuloCluster standaloneCluster = new StandaloneAccumuloCluster( -cluster.getClientInfo(), conf.getTmpDirectory(), conf.getUsers(), +conf.getClientInfo(), conf.getTmpDirectory(), conf.getUsers(), conf.getServerAccumuloConfDir()); // If these are provided in the configuration, pass them into the cluster standaloneCluster.setAccumuloHome(conf.getAccumuloHome()); @@ -145,6 +145,7 @@ public abstract class AccumuloClusterHarness extends AccumuloITBase standaloneCluster.setHadoopConfDir(conf.getHadoopConfDir()); standaloneCluster.setServerCmdPrefix(conf.getServerCmdPrefix()); standaloneCluster.setClientCmdPrefix(conf.getClientCmdPrefix()); +cluster = standaloneCluster; // For SASL, we need to get the Hadoop configuration files as well otherwise UGI will log in // as SIMPLE instead of KERBEROS @@ -155,9 +156,6 @@ public abstract class AccumuloClusterHarness extends AccumuloITBase UserGroupInformation.loginUserFromKeytab(conf.getAdminPrincipal(), conf.getAdminKeytab().getAbsolutePath()); } - -// Set the implementation -cluster = standaloneCluster; break; default: throw new RuntimeException("Unhandled type");