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 2020/01/21 16:48:34 UTC
[accumulo] branch 1.9 updated: Validate ClientOpts instance name
and Zookeeper paths (#1478)
This is an automated email from the ASF dual-hosted git repository.
mmiller pushed a commit to branch 1.9
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/1.9 by this push:
new 6883f6b Validate ClientOpts instance name and Zookeeper paths (#1478)
6883f6b is described below
commit 6883f6b3165f8ee4d96b3e3742f61c4b0e7e66fa
Author: Arvind Shyamsundar <ar...@microsoft.com>
AuthorDate: Tue Jan 21 08:48:24 2020 -0800
Validate ClientOpts instance name and Zookeeper paths (#1478)
* Only override instance name and ZK paths if those were specified by caller.
---
core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
index 434c959..8207875 100644
--- a/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
+++ b/core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
@@ -404,7 +404,10 @@ public class ClientOpts extends Help {
return cachedClientConfig =
clientConfig.withInstance(UUID.fromString(instanceIDFromFile)).withZkHosts(zookeepers);
}
- return cachedClientConfig = clientConfig.withInstance(instance).withZkHosts(zookeepers);
- }
+ if (instance != null && zookeepers != null)
+ return cachedClientConfig = clientConfig.withInstance(instance).withZkHosts(zookeepers);
+ else
+ return clientConfig;
+ }
}