Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F445109CE for ; Wed, 26 Nov 2014 04:23:20 +0000 (UTC) Received: (qmail 41931 invoked by uid 500); 26 Nov 2014 04:23:20 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 41813 invoked by uid 500); 26 Nov 2014 04:23:20 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 40110 invoked by uid 99); 26 Nov 2014 04:23:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Nov 2014 04:23:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D8DD532A487; Wed, 26 Nov 2014 04:23:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: elserj@apache.org To: commits@accumulo.apache.org Date: Wed, 26 Nov 2014 04:23:33 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [17/50] [abbrv] accumulo git commit: ACCUMULO-3167 Stop using ZooKeeper directly to recover from ConnectionLoss automatically ACCUMULO-3167 Stop using ZooKeeper directly to recover from ConnectionLoss automatically Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/8f09ea16 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/8f09ea16 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/8f09ea16 Branch: refs/heads/master Commit: 8f09ea163ca16e373b6653e738500ad9c60fa4d5 Parents: b0e3008 Author: Josh Elser Authored: Sun Nov 23 14:19:14 2014 -0500 Committer: Josh Elser Committed: Mon Nov 24 18:08:52 2014 -0500 ---------------------------------------------------------------------- .../test/java/org/apache/accumulo/test/VolumeIT.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/8f09ea16/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 844c250..dc534d5 100644 --- a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java @@ -60,6 +60,7 @@ import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.core.security.TablePermission; import org.apache.accumulo.core.util.CachedConfiguration; import org.apache.accumulo.core.zookeeper.ZooUtil; +import org.apache.accumulo.fate.zookeeper.ZooReader; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.server.ServerConstants; import org.apache.accumulo.server.init.Initialize; @@ -71,7 +72,6 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.RawLocalFileSystem; import org.apache.hadoop.io.Text; -import org.apache.zookeeper.ZooKeeper; import org.junit.Assert; import org.junit.Test; @@ -464,11 +464,10 @@ public class VolumeIT extends ConfigurableMacIT { verifyVolumesUsed(tableNames[0], true, v2); // 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; - ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null); - String rootTabletDir = new String(zookeeper.getData(zpath, false, null), UTF_8); + String rootTabletDir = new String(zreader.getData(zpath, false, null), UTF_8); Assert.assertTrue(rootTabletDir.startsWith(v2.toString())); - zookeeper.close(); conn.tableOperations().clone(tableNames[0], tableNames[1], true, new HashMap(), new HashSet()); @@ -526,11 +525,10 @@ public class VolumeIT extends ConfigurableMacIT { verifyVolumesUsed(tableNames[1], true, v8, v9); // 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; - ZooKeeper zookeeper = new ZooKeeper(cluster.getZooKeepers(), 30000, null); - String rootTabletDir = new String(zookeeper.getData(zpath, false, null), UTF_8); + String rootTabletDir = new String(zreader.getData(zpath, false, null), UTF_8); Assert.assertTrue(rootTabletDir.startsWith(v8.toString()) || rootTabletDir.startsWith(v9.toString())); - zookeeper.close(); getConnector().tableOperations().clone(tableNames[1], tableNames[2], true, new HashMap(), new HashSet());