You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2016/12/06 18:40:21 UTC
[09/11] accumulo git commit: ACCUMULO-4505: Another fix for shell
errroneously reading conf
ACCUMULO-4505: Another fix for shell errroneously reading conf
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3c454414
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3c454414
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3c454414
Branch: refs/heads/master
Commit: 3c4544144a78904198b6795828c176e806b64e09
Parents: a4a4539
Author: Mike Miller <mm...@apache.org>
Authored: Tue Dec 6 11:31:55 2016 -0500
Committer: Mike Miller <mm...@apache.org>
Committed: Tue Dec 6 11:31:55 2016 -0500
----------------------------------------------------------------------
.../java/org/apache/accumulo/shell/ShellOptionsJC.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3c454414/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
index f6d1ac9..7c27343 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/ShellOptionsJC.java
@@ -318,6 +318,13 @@ public class ShellOptionsJC {
clientConfig.setProperty(ClientProperty.INSTANCE_ZK_HOST, hosts);
clientConfig.setProperty(ClientProperty.INSTANCE_NAME, instanceName);
}
+ // If the user provided the hosts, set the ZK for tracing too
+ if (null != zooKeeperHosts && !zooKeeperHosts.isEmpty()) {
+ clientConfig.setProperty(ClientProperty.INSTANCE_ZK_HOST, zooKeeperHosts);
+ }
+ if (null != zooKeeperInstanceName && !zooKeeperInstanceName.isEmpty()) {
+ clientConfig.setProperty(ClientProperty.INSTANCE_NAME, zooKeeperInstanceName);
+ }
// Automatically try to add in the proper ZK from accumulo-site for backwards compat.
if (!clientConfig.containsKey(ClientProperty.INSTANCE_ZK_HOST.getKey())) {
@@ -325,11 +332,6 @@ public class ShellOptionsJC {
clientConfig.withZkHosts(siteConf.get(Property.INSTANCE_ZK_HOST));
}
- // If the user provided the hosts, set the ZK for tracing too
- if (null != zooKeeperHosts) {
- clientConfig.setProperty(ClientProperty.INSTANCE_ZK_HOST, zooKeeperHosts);
- }
-
return clientConfig;
}