Repository: accumulo Updated Branches: refs/heads/1.6 9dcfa631c -> d1aaecba9 refs/heads/master 4e400f0d2 -> 3a05a5de8
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/1.6 Commit: d1aaecba9127428cbde324aec20c7d58c24953c2 Parents: 9dcfa63 Author: Josh Elser <els...@apache.org> Authored: Fri Feb 27 17:05:10 2015 -0500 Committer: Josh Elser <els...@apache.org> 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.<AccumuloConfiguration> anyObject()); expectLastCall().atLeastOnce();