Repository: accumulo
Updated Branches:
  refs/heads/1.7 a4a453986 -> 3c4544144


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/1.7
Commit: 3c4544144a78904198b6795828c176e806b64e09
Parents: a4a4539
Author: Mike Miller <mmil...@apache.org>
Authored: Tue Dec 6 11:31:55 2016 -0500
Committer: Mike Miller <mmil...@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;
   }
 

Reply via email to