accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo-testing] branch master updated: ACCUMULO-4848 Fix ClientConfiguration errors
Date Wed, 14 Mar 2018 21:43:49 GMT
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 435e541  ACCUMULO-4848 Fix ClientConfiguration errors
435e541 is described below

commit 435e54177f658cc9f620141453b8c8f8b163cb0b
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Wed Mar 14 17:01:57 2018 -0400

    ACCUMULO-4848 Fix ClientConfiguration errors
---
 .../core/randomwalk/multitable/CopyTool.java       |  4 +-
 .../core/randomwalk/security/SecurityFixture.java  |  2 +-
 .../randomwalk/sequential/MapRedVerifyTool.java    |  2 +-
 .../testing/core/scalability/ScaleTest.java        |  3 +-
 .../resources/randomwalk/modules/Replication.xml   | 58 ++++++++++++++++++++++
 5 files changed, 64 insertions(+), 5 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/multitable/CopyTool.java
b/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/multitable/CopyTool.java
index 378aa3b..5c979d3 100644
--- a/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/multitable/CopyTool.java
+++ b/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/multitable/CopyTool.java
@@ -64,7 +64,7 @@ public class CopyTool extends Configured implements Tool {
       return 1;
     }
 
-    ClientConfiguration clientConf = new ClientConfiguration().withInstance(args[3]).withZkHosts(args[4]);
+    ClientConfiguration clientConf = ClientConfiguration.create().withInstance(args[3]).withZkHosts(args[4]);
 
     job.setInputFormatClass(AccumuloInputFormat.class);
     AccumuloInputFormat.setInputTableName(job, args[2]);
@@ -73,7 +73,7 @@ public class CopyTool extends Configured implements Tool {
 
     final String principal;
     final AuthenticationToken token;
-    if (clientConf.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), false))
{
+    if (Boolean.parseBoolean(clientConf.get(ClientProperty.INSTANCE_RPC_SASL_ENABLED))) {
       // Use the Kerberos creds to request a DelegationToken for MapReduce
       // to use
       // We could use the specified keytab (args[1]), but we're already
diff --git a/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/security/SecurityFixture.java
b/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/security/SecurityFixture.java
index bc8fdc1..1bffba0 100644
--- a/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/security/SecurityFixture.java
+++ b/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/security/SecurityFixture.java
@@ -37,7 +37,7 @@ public class SecurityFixture extends Fixture {
     String secTableName, systemUserName, tableUserName, secNamespaceName;
     // A best-effort sanity check to guard against not password-based auth
     ClientConfiguration clientConf = ClientConfiguration.loadDefault();
-    if (clientConf.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), false))
{
+    if (Boolean.parseBoolean(clientConf.get(ClientProperty.INSTANCE_RPC_SASL_ENABLED))) {
       throw new IllegalStateException("Security module currently cannot support Kerberos/SASL
instances");
     }
 
diff --git a/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/sequential/MapRedVerifyTool.java
b/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/sequential/MapRedVerifyTool.java
index 90ca2d9..e8dcca1 100644
--- a/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/sequential/MapRedVerifyTool.java
+++ b/core/src/main/java/org/apache/accumulo/testing/core/randomwalk/sequential/MapRedVerifyTool.java
@@ -103,7 +103,7 @@ public class MapRedVerifyTool extends Configured implements Tool {
     AccumuloOutputFormat.setZooKeeperInstance(job, clientConf);
 
     job.setInputFormatClass(AccumuloInputFormat.class);
-    if (clientConf.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(), false))
{
+    if (Boolean.parseBoolean(clientConf.get(ClientProperty.INSTANCE_RPC_SASL_ENABLED))) {
       // Better be logged in
       KerberosToken token = new KerberosToken();
       try {
diff --git a/core/src/main/java/org/apache/accumulo/testing/core/scalability/ScaleTest.java
b/core/src/main/java/org/apache/accumulo/testing/core/scalability/ScaleTest.java
index a78f39e..4ed19a0 100644
--- a/core/src/main/java/org/apache/accumulo/testing/core/scalability/ScaleTest.java
+++ b/core/src/main/java/org/apache/accumulo/testing/core/scalability/ScaleTest.java
@@ -48,7 +48,8 @@ public abstract class ScaleTest {
     String password = this.scaleProps.getProperty("PASSWORD");
     System.out.println(password);
 
-    conn = new ZooKeeperInstance(new ClientConfiguration().withInstance(instanceName).withZkHosts(zookeepers)).getConnector(user,
new PasswordToken(password));
+    conn = new ZooKeeperInstance(ClientConfiguration.create().withInstance(instanceName).withZkHosts(zookeepers)).getConnector(user,
+        new PasswordToken(password));
   }
 
   protected void startTimer() {
diff --git a/core/src/main/resources/randomwalk/modules/Replication.xml b/core/src/main/resources/randomwalk/modules/Replication.xml
new file mode 100644
index 0000000..1eba005
--- /dev/null
+++ b/core/src/main/resources/randomwalk/modules/Replication.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<module>
+
+<package prefix="repl" value="org.apache.accumulo.test.randomwalk.replication"/>
+
+<init id="repl.Setup"/>
+
+<node id="dummy.ToAll">
+  <edge id="repl.Online" weight="100"/>
+  <edge id="repl.BatchWrite" weight="100"/>
+  <edge id="repl.Replication" weight="10"/>
+  <edge id="repl.Verify" weight="1"/>
+</node>
+
+<node id="repl.Setup">
+  <property key="rows" value="1000"/>
+  <property key="cols" value="50"/>
+  <edge id="repl.Online" weight="1"/>
+</node>
+
+<node id="repl.Online">
+  <edge id="dummy.ToAll" weight="1"/>
+</node>
+
+<node id="repl.BatchWrite">
+  <edge id="dummy.ToAll" weight="1"/>
+</node>
+
+<node id="repl.Replicaiton">
+  <edge id="dummy.ToAll" weight="1"/>
+</node>
+
+<node id="ct.Verify">
+  <edge id="dummy.ToAll" weight="1000"/>
+  <edge id="repl.TearDown" weight="1"/>
+</node>
+
+<node id="repl.TearDown">
+  <edge id="END" weight="1"/>
+</node>
+
+</module>

-- 
To stop receiving notification emails like this one, please contact
mmiller@apache.org.

Mime
View raw message