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 7AB7A17381 for ; Tue, 21 Oct 2014 18:04:59 +0000 (UTC) Received: (qmail 30643 invoked by uid 500); 21 Oct 2014 18:04:59 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 30613 invoked by uid 500); 21 Oct 2014 18:04:59 -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 30602 invoked by uid 99); 21 Oct 2014 18:04:59 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Oct 2014 18:04:59 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0773C93B099; Tue, 21 Oct 2014 18:04:58 +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 Message-Id: <64880af00cb14831a478f39151579537@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: ACCUMULO-3247 Add a toString on ZooKeeperInstance Date: Tue, 21 Oct 2014 18:04:58 +0000 (UTC) Repository: accumulo Updated Branches: refs/heads/master 0b010256d -> 2e012e18d ACCUMULO-3247 Add a toString on ZooKeeperInstance Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2e012e18 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2e012e18 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2e012e18 Branch: refs/heads/master Commit: 2e012e18d0e2476c3a6a9990d777d600602b8007 Parents: 0b01025 Author: Josh Elser Authored: Tue Oct 21 13:43:23 2014 -0400 Committer: Josh Elser Committed: Tue Oct 21 13:43:23 2014 -0400 ---------------------------------------------------------------------- .../accumulo/core/client/ZooKeeperInstance.java | 23 +++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/2e012e18/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java index 6b41c1d..3dba358 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java +++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java @@ -46,15 +46,15 @@ import org.apache.log4j.Logger; /** *

* An implementation of instance that looks in zookeeper to find information needed to connect to an instance of accumulo. - * + * *

* The advantage of using zookeeper to obtain information about accumulo is that zookeeper is highly available, very responsive, and supports caching. - * + * *

* Because it is possible for multiple instances of accumulo to share a single set of zookeeper servers, all constructors require an accumulo instance name. - * + * * If you do not know the instance names then run accumulo org.apache.accumulo.server.util.ListInstances on an accumulo server. - * + * */ public class ZooKeeperInstance implements Instance { @@ -73,7 +73,7 @@ public class ZooKeeperInstance implements Instance { private ClientConfiguration clientConf; /** - * + * * @param instanceName * The name of specific accumulo instance. This is set at initialization time. * @param zooKeepers @@ -84,7 +84,7 @@ public class ZooKeeperInstance implements Instance { } /** - * + * * @param instanceName * The name of specific accumulo instance. This is set at initialization time. * @param zooKeepers @@ -99,7 +99,7 @@ public class ZooKeeperInstance implements Instance { } /** - * + * * @param instanceId * The UUID that identifies the accumulo instance you want to connect to. * @param zooKeepers @@ -112,7 +112,7 @@ public class ZooKeeperInstance implements Instance { } /** - * + * * @param instanceId * The UUID that identifies the accumulo instance you want to connect to. * @param zooKeepers @@ -270,4 +270,11 @@ public class ZooKeeperInstance implements Instance { } return null; } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(64); + sb.append("ZooKeeperInstance: ").append(getInstanceName()).append(" ").append(getZooKeepers()); + return sb.toString(); + } }