You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/03/14 22:46:44 UTC

[GitHub] [accumulo-testing] mikewalch commented on a change in pull request #65: Update ClientOpts

mikewalch commented on a change in pull request #65: Update ClientOpts
URL: https://github.com/apache/accumulo-testing/pull/65#discussion_r265794960
 
 

 ##########
 File path: src/main/java/org/apache/accumulo/testing/cli/ClientOpts.java
 ##########
 @@ -169,34 +165,20 @@ public String getClientConfigFile() {
     return clientConfigFile;
   }
 
-  public Properties getClientProperties() {
+  public Properties getClientProps() {
     if (cachedProps == null) {
       cachedProps = new Properties();
       if (getClientConfigFile() != null) {
         cachedProps = toProperties(Paths.get(getClientConfigFile()));
       }
-      if (saslEnabled) {
-        cachedProps.setProperty(ClientProperty.SASL_ENABLED.getKey(), "true");
-      }
-      if (sslEnabled) {
-        cachedProps.setProperty(ClientProperty.SSL_ENABLED.getKey(), "true");
-      }
       if (principal != null) {
         cachedProps.setProperty(ClientProperty.AUTH_PRINCIPAL.getKey(), principal);
       }
-      if (zookeepers != null) {
-        cachedProps.setProperty(ClientProperty.INSTANCE_ZOOKEEPERS.getKey(), zookeepers);
-      }
-      if (instance != null) {
-        cachedProps.setProperty(ClientProperty.INSTANCE_NAME.getKey(), instance);
-      }
       if (securePassword != null) {
         ClientProperty.setPassword(cachedProps, securePassword.toString());
-      } else if (password != null) {
-        ClientProperty.setPassword(cachedProps, password.toString());
-      } else if (keytabPath != null) {
-        ClientProperty.setKerberosKeytab(cachedProps, keytabPath);
       }
+      getOverrides().forEach((k, v) -> cachedProps.put(k, v));
 
 Review comment:
   Yes it works.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services