accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [09/11] accumulo git commit: ACCUMULO-4505: Another fix for shell errroneously reading conf
Date Tue, 06 Dec 2016 18:40:21 GMT
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 <mmiller@apache.org>
Authored: Tue Dec 6 11:31:55 2016 -0500
Committer: Mike Miller <mmiller@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;
   }
 


Mime
View raw message