Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EE943200C32 for ; Thu, 9 Mar 2017 16:01:24 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ED233160B67; Thu, 9 Mar 2017 15:01:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 67C1E160B64 for ; Thu, 9 Mar 2017 16:01:24 +0100 (CET) Received: (qmail 82871 invoked by uid 500); 9 Mar 2017 15:01:23 -0000 Mailing-List: contact dev-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 dev@accumulo.apache.org Received: (qmail 82854 invoked by uid 99); 9 Mar 2017 15:01:23 -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; Thu, 09 Mar 2017 15:01:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3D798DFE1E; Thu, 9 Mar 2017 15:01:23 +0000 (UTC) From: milleruntime To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #232: ACCUMULO-4600: Fix to properly read from accumul... Content-Type: text/plain Message-Id: <20170309150123.3D798DFE1E@git1-us-west.apache.org> Date: Thu, 9 Mar 2017 15:01:23 +0000 (UTC) archived-at: Thu, 09 Mar 2017 15:01:25 -0000 Github user milleruntime commented on a diff in the pull request: https://github.com/apache/accumulo/pull/232#discussion_r105182870 --- Diff: shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java --- @@ -123,29 +118,21 @@ public void testTokenAndOptionAndPassword() throws IOException { @Test public void testZooKeeperHostFallBackToSite() throws Exception { ClientConfiguration clientConfig = new ClientConfiguration(); - Map data = new HashMap<>(); - data.put(Property.INSTANCE_ZK_HOST.getKey(), "site_hostname"); - AccumuloConfiguration conf = new ConfigurationCopy(data); - assertEquals("site_hostname", Shell.getZooKeepers(null, clientConfig)); + assertFalse("Client config contains zk hosts", clientConfig.containsKey(ClientConfiguration.ClientProperty.INSTANCE_ZK_HOST.getKey())); + assertEquals("localhost:2181", Shell.getZooKeepers(null, clientConfig)); --- End diff -- It does not seem that way but the last resort of `Shell.getZooKeepers()` is to make a static call to get the site configuration: `SiteConfiguration.getInstance(ClientContext.convertClientConfig(clientConfig)).get(Property.INSTANCE_ZK_HOST)` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---