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 2015/06/02 23:57:09 UTC

[4/7] accumulo git commit: ACCUMULO-3882 Use provided ClientConfiguration

ACCUMULO-3882 Use provided ClientConfiguration

Avoids a locally installed clientconfiguration file
from breaking the test.


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

Branch: refs/heads/1.7
Commit: 5bd993bae0040bf7179565ca8a2fedf2cf210d9f
Parents: 198c5fb
Author: Josh Elser <el...@apache.org>
Authored: Tue Jun 2 17:09:49 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Tue Jun 2 17:22:13 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/test/AccumuloOutputFormatIT.java     | 6 +++---
 test/src/test/java/org/apache/accumulo/test/VolumeIT.java    | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5bd993ba/test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatIT.java b/test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatIT.java
index 9d00584..a2f522e 100644
--- a/test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/AccumuloOutputFormatIT.java
@@ -82,8 +82,8 @@ public class AccumuloOutputFormatIT {
 
   @Test
   public void testMapred() throws Exception {
-
-    ZooKeeperInstance instance = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers());
+    ClientConfiguration clientConfig = accumulo.getClientConfig();
+    ZooKeeperInstance instance = new ZooKeeperInstance(clientConfig);
     Connector connector = instance.getConnector("root", new PasswordToken(secret));
     // create a table and put some data in it
     connector.tableOperations().create(TABLE);
@@ -98,7 +98,7 @@ public class AccumuloOutputFormatIT {
     batchConfig.setMaxMemory(Long.MAX_VALUE);
     AccumuloOutputFormat outputFormat = new AccumuloOutputFormat();
     AccumuloOutputFormat.setBatchWriterOptions(job, batchConfig);
-    AccumuloOutputFormat.setZooKeeperInstance(job, new ClientConfiguration().withInstance(instance.getInstanceName()).withZkHosts(instance.getZooKeepers()));
+    AccumuloOutputFormat.setZooKeeperInstance(job, clientConfig);
     AccumuloOutputFormat.setConnectorInfo(job, "root", new PasswordToken(secret));
     RecordWriter<Text,Mutation> writer = outputFormat.getRecordWriter(null, job, "Test", null);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5bd993ba/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
index d9b9429..d4b3b61 100644
--- a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java
@@ -263,7 +263,7 @@ public class VolumeIT extends ConfigurableMacIT {
     String[] tableNames = getUniqueNames(2);
 
     // grab this before shutting down cluster
-    String uuid = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers()).getInstanceID();
+    String uuid = new ZooKeeperInstance(cluster.getClientConfig()).getInstanceID();
 
     verifyVolumesUsed(tableNames[0], false, v1, v2);
 
@@ -306,7 +306,7 @@ public class VolumeIT extends ConfigurableMacIT {
     String[] tableNames = getUniqueNames(2);
 
     // grab this before shutting down cluster
-    String uuid = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers()).getInstanceID();
+    String uuid = new ZooKeeperInstance(cluster.getClientConfig()).getInstanceID();
 
     verifyVolumesUsed(tableNames[0], false, v1, v2);
 
@@ -464,7 +464,7 @@ public class VolumeIT extends ConfigurableMacIT {
 
     // check that root tablet is not on volume 1
     ZooReader zreader = new ZooReader(cluster.getZooKeepers(), 30000);
-    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH;
+    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getClientConfig())) + RootTable.ZROOT_TABLET_PATH;
     String rootTabletDir = new String(zreader.getData(zpath, false, null), UTF_8);
     Assert.assertTrue(rootTabletDir.startsWith(v2.toString()));
 
@@ -525,7 +525,7 @@ public class VolumeIT extends ConfigurableMacIT {
 
     // check that root tablet is not on volume 1 or 2
     ZooReader zreader = new ZooReader(cluster.getZooKeepers(), 30000);
-    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers())) + RootTable.ZROOT_TABLET_PATH;
+    String zpath = ZooUtil.getRoot(new ZooKeeperInstance(cluster.getClientConfig())) + RootTable.ZROOT_TABLET_PATH;
     String rootTabletDir = new String(zreader.getData(zpath, false, null), UTF_8);
     Assert.assertTrue(rootTabletDir.startsWith(v8.toString()) || rootTabletDir.startsWith(v9.toString()));