accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [6/6] accumulo git commit: Merge branch '1.8'
Date Mon, 11 Jul 2016 20:40:35 GMT
Merge branch '1.8'


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/bf729054
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/bf729054
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/bf729054

Branch: refs/heads/master
Commit: bf7290546a4c720e9ba2d40498d653bc54b12741
Parents: ad6e981 4c4ad86
Author: Josh Elser <elserj@apache.org>
Authored: Mon Jul 11 16:40:17 2016 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Jul 11 16:40:17 2016 -0400

----------------------------------------------------------------------
 shell/src/main/java/org/apache/accumulo/shell/Shell.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bf729054/shell/src/main/java/org/apache/accumulo/shell/Shell.java
----------------------------------------------------------------------
diff --cc shell/src/main/java/org/apache/accumulo/shell/Shell.java
index 9f4b4b64,053e998..2300d9e
--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java
@@@ -442,22 -448,28 +443,24 @@@ public class Shell extends ShellOption
    protected void setInstance(ShellOptionsJC options) {
      // should only be one set of instance options set
      instance = null;
 -    if (options.isFake()) {
 -      instance = DeprecationUtil.makeMockInstance("fake");
 +    String instanceName, hosts;
 +    if (options.isHdfsZooInstance()) {
 +      instanceName = hosts = null;
 +    } else if (options.getZooKeeperInstance().size() > 0) {
 +      List<String> zkOpts = options.getZooKeeperInstance();
 +      instanceName = zkOpts.get(0);
 +      hosts = zkOpts.get(1);
      } else {
 -      String instanceName, hosts;
 -      if (options.isHdfsZooInstance()) {
 -        instanceName = hosts = null;
 -      } else if (options.getZooKeeperInstance().size() > 0) {
 -        List<String> zkOpts = options.getZooKeeperInstance();
 -        instanceName = zkOpts.get(0);
 -        hosts = zkOpts.get(1);
 -      } else {
 -        instanceName = options.getZooKeeperInstanceName();
 -        hosts = options.getZooKeeperHosts();
 -      }
 -      final ClientConfiguration clientConf;
 -      try {
 -        clientConf = options.getClientConfiguration();
 -      } catch (ConfigurationException | FileNotFoundException e) {
 -        throw new IllegalArgumentException("Unable to load client config from " + options.getClientConfigFile(),
e);
 -      }
 -      instance = getZooInstance(instanceName, hosts, clientConf);
 +      instanceName = options.getZooKeeperInstanceName();
 +      hosts = options.getZooKeeperHosts();
 +    }
++    final ClientConfiguration clientConf;
 +    try {
-       instance = getZooInstance(instanceName, hosts, options.getClientConfiguration());
-     } catch (Exception e) {
++      clientConf = options.getClientConfiguration();
++    } catch (ConfigurationException | FileNotFoundException e) {
 +      throw new IllegalArgumentException("Unable to load client config from " + options.getClientConfigFile(),
e);
      }
++    instance = getZooInstance(instanceName, hosts, clientConf);
    }
  
    /**


Mime
View raw message