Skip to content
Permalink
Browse files
ACCUMULO-4848 Fix ClientConfiguration errors
  • Loading branch information
milleruntime committed Mar 14, 2018
1 parent 300e649 commit 435e54177f658cc9f620141453b8c8f8b163cb0b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 5 deletions.
@@ -64,7 +64,7 @@ public int run(String[] args) throws Exception {
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 int run(String[] args) throws Exception {

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
@@ -37,7 +37,7 @@ public void setUp(State state, RandWalkEnv env) throws Exception {
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");
}

@@ -103,7 +103,7 @@ public int run(String[] args) throws Exception {
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 {
@@ -48,7 +48,8 @@ public void init(Properties scaleProps, Properties testProps, int numTabletServe
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() {
@@ -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>

0 comments on commit 435e541

Please sign in to comment.