You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/09/18 18:25:01 UTC

[2/3] git commit: ACCUMULO-3078 ACCUMULO-3138 Remove the getStaticCluster reference again

ACCUMULO-3078 ACCUMULO-3138 Remove the getStaticCluster reference again

The AccumuloConfiguration from the Instance is at least the
ClientConfiguration. We can use that to remove the reliance
on needing the shared MiniAccumuloCluster.


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

Branch: refs/heads/master
Commit: 255ce5f25164dc1c429ee57bbeecfdb1f976cacb
Parents: d0f95f8
Author: Josh Elser <el...@apache.org>
Authored: Thu Sep 18 12:23:26 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Thu Sep 18 12:23:26 2014 -0400

----------------------------------------------------------------------
 .../accumulo/test/functional/AccumuloInputFormatIT.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/255ce5f2/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java b/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
index acd7440..a3427bb 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java
@@ -36,6 +36,8 @@ import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.mapreduce.AccumuloInputFormat;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
@@ -71,10 +73,11 @@ public class AccumuloInputFormatIT extends SimpleMacIT {
     insertData(table, currentTimeMillis());
 
     ClientConfiguration clientConf = new ClientConfiguration().withInstance(conn.getInstance().getInstanceName()).withZkHosts(
-        conn.getInstance().getZooKeepers()), clusterClientConf = getStaticCluster().getClientConfig();
+        conn.getInstance().getZooKeepers());
+    AccumuloConfiguration clusterClientConf = conn.getInstance().getConfiguration();
 
     // Pass SSL and CredentialProvider options into the ClientConfiguration given to AccumuloInputFormat
-    boolean sslEnabled = Boolean.valueOf(clusterClientConf.get(ClientProperty.INSTANCE_RPC_SSL_ENABLED));
+    boolean sslEnabled = Boolean.valueOf(clusterClientConf.get(Property.INSTANCE_RPC_SSL_ENABLED));
     if (sslEnabled) {
       ClientProperty[] sslProperties = new ClientProperty[] {ClientProperty.INSTANCE_RPC_SSL_ENABLED, ClientProperty.INSTANCE_RPC_SSL_CLIENT_AUTH,
           ClientProperty.RPC_SSL_KEYSTORE_PATH, ClientProperty.RPC_SSL_KEYSTORE_TYPE, ClientProperty.RPC_SSL_KEYSTORE_PASSWORD,
@@ -83,7 +86,7 @@ public class AccumuloInputFormatIT extends SimpleMacIT {
 
       for (ClientProperty prop : sslProperties) {
         // The default property is returned if it's not in the ClientConfiguration so we don't have to check if the value is actually defined
-        clientConf.setProperty(prop, clusterClientConf.get(prop));
+        clientConf.setProperty(prop, clusterClientConf.get(prop.getAccumuloProperty()));
       }
     }