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 9AE4C10B10 for ; Fri, 27 Feb 2015 22:27:00 +0000 (UTC) Received: (qmail 16444 invoked by uid 500); 27 Feb 2015 22:27:00 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 16412 invoked by uid 500); 27 Feb 2015 22:27:00 -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 16337 invoked by uid 99); 27 Feb 2015 22:27:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Feb 2015 22:27:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5359CE07A7; Fri, 27 Feb 2015 22:27:00 +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: Fri, 27 Feb 2015 22:27:01 -0000 Message-Id: In-Reply-To: <853e0546c237463796f1a883a24f741f@git.apache.org> References: <853e0546c237463796f1a883a24f741f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] accumulo git commit: ACCUMULO-3465 Ensure ZK hosts can be set from clietn config ACCUMULO-3465 Ensure ZK hosts can be set from clietn config Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d1aaecba Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d1aaecba Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d1aaecba Branch: refs/heads/master Commit: d1aaecba9127428cbde324aec20c7d58c24953c2 Parents: 9dcfa63 Author: Josh Elser Authored: Fri Feb 27 17:05:10 2015 -0500 Committer: Josh Elser Committed: Fri Feb 27 17:05:10 2015 -0500 ---------------------------------------------------------------------- .../src/main/java/org/apache/accumulo/core/util/shell/Shell.java | 3 +++ .../apache/accumulo/core/util/shell/ShellSetInstanceTest.java | 4 ++++ 2 files changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/d1aaecba/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java b/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java index 21e0470..1f14b6f 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java +++ b/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java @@ -440,6 +440,9 @@ public class Shell extends ShellOptions { if (instanceName == null) { instanceName = clientConfig.get(ClientProperty.INSTANCE_NAME); } + if (keepers == null) { + keepers = clientConfig.get(ClientProperty.INSTANCE_ZK_HOST); + } if (instanceName == null || keepers == null) { AccumuloConfiguration conf = SiteConfiguration.getInstance(ServerConfigurationUtil.convertClientConfig(DefaultConfiguration.getInstance(), clientConfig)); if (instanceName == null) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/d1aaecba/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java b/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java index d92eff0..0959c35 100644 --- a/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java +++ b/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java @@ -167,6 +167,10 @@ public class ShellSetInstanceTest { expect(clientConf.get(ClientProperty.INSTANCE_NAME)).andReturn(null); } + if (!onlyHosts) { + expect(clientConf.get(ClientProperty.INSTANCE_ZK_HOST)).andReturn(null); + } + mockStatic(ConfigSanityCheck.class); ConfigSanityCheck.validate(EasyMock. anyObject()); expectLastCall().atLeastOnce();