accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1490272 - in /accumulo/trunk/core/src/main/java/org/apache/accumulo/core: client/mock/MockShell.java util/shell/Shell.java util/shell/ShellOptions.java util/shell/ShellOptionsJC.java
Date Thu, 06 Jun 2013 13:22:22 GMT
Author: ecn
Date: Thu Jun  6 13:22:22 2013
New Revision: 1490272

URL: http://svn.apache.org/r1490272
Log:
ACCUMULO-1478 applying Mike Drob's patch

Added:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
  (with props)
Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptions.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java?rev=1490272&r1=1490271&r2=1490272&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockShell.java
Thu Jun  6 13:22:22 2013
@@ -17,7 +17,6 @@
 package org.apache.accumulo.core.client.mock;
 
 import java.io.ByteArrayInputStream;
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -25,7 +24,7 @@ import java.io.OutputStream;
 import jline.console.ConsoleReader;
 
 import org.apache.accumulo.core.util.shell.Shell;
-import org.apache.commons.cli.CommandLine;
+import org.apache.accumulo.core.util.shell.ShellOptionsJC;
 
 /**
  * An Accumulo Shell implementation that allows a developer to attach an InputStream and
Writer to the Shell for testing purposes.
@@ -63,7 +62,7 @@ public class MockShell extends Shell {
   }
   
   @Override
-  protected void setInstance(CommandLine cl) {
+  protected void setInstance(ShellOptionsJC options) {
     // We always want a MockInstance for this test
     instance = new MockInstance();
   }
@@ -77,7 +76,7 @@ public class MockShell extends Shell {
       printInfo();
     
     if (execFile != null) {
-      java.util.Scanner scanner = new java.util.Scanner(new File(execFile));
+      java.util.Scanner scanner = new java.util.Scanner(execFile);
       try {
         while (scanner.hasNextLine() && !hasExited()) {
           execCommand(scanner.nextLine(), true, isVerbose());

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1490272&r1=1490271&r2=1490272&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java Thu Jun
 6 13:22:22 2013
@@ -47,7 +47,6 @@ import org.apache.accumulo.core.client.T
 import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.mock.MockInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
-import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
@@ -145,7 +144,6 @@ import org.apache.accumulo.fate.zookeepe
 import org.apache.commons.cli.BasicParser;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.MissingArgumentException;
 import org.apache.commons.cli.MissingOptionException;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
@@ -154,6 +152,9 @@ import org.apache.hadoop.fs.Path;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 
+import com.beust.jcommander.JCommander;
+import com.beust.jcommander.ParameterException;
+
 /**
  * A convenient console interface to perform basic accumulo functions Includes auto-complete,
help, and quoted strings with escape sequences
  */
@@ -167,7 +168,6 @@ public class Shell extends ShellOptions 
   public static final String HISTORY_DIR_NAME = ".accumulo";
   public static final String HISTORY_FILE_NAME = "shell_history.txt";
   private static final String SHELL_DESCRIPTION = "Shell - Apache Accumulo Interactive Shell";
-  private static final String DEFAULT_AUTH_TIMEOUT = "60"; // in minutes
   
   protected int exitCode = 0;
   private String tableName;
@@ -190,7 +190,7 @@ public class Shell extends ShellOptions 
   private boolean exit = false;
   
   // file to execute commands from
-  protected String execFile = null;
+  protected File execFile = null;
   // single command to execute from the command line
   protected String execCommand = null;
   protected boolean verbose = true;
@@ -219,99 +219,97 @@ public class Shell extends ShellOptions 
   
   // Not for client use
   public boolean config(String... args) {
+    ShellOptionsJC options = new ShellOptionsJC();
+    JCommander jc = new JCommander();
     
-    CommandLine cl;
+    jc.setProgramName("accumulo shell");
+    jc.addObject(options);
     try {
-      cl = new BasicParser().parse(opts, args);
-      if (cl.getArgs().length > 0)
-        throw new ParseException("Unrecognized arguments: " + cl.getArgList());
-      
-      if (cl.hasOption(helpOpt.getOpt())) {
-        configError = true;
-        printHelp("shell", SHELL_DESCRIPTION, opts);
-        return true;
-      }
-      
-      setDebugging(cl.hasOption(debugOption.getLongOpt()));
-      authTimeout = Integer.parseInt(cl.getOptionValue(authTimeoutOpt.getLongOpt(), DEFAULT_AUTH_TIMEOUT))
* 60 * 1000;
-      disableAuthTimeout = cl.hasOption(disableAuthTimeoutOpt.getLongOpt());
-      
-      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length
!= 2)
-        throw new MissingArgumentException(zooKeeperInstance);
-      
-    } catch (Exception e) {
+      jc.parse(args);
+    } catch (ParameterException e) {
       configError = true;
-      printException(e);
-      printHelp("shell", SHELL_DESCRIPTION, opts);
+    }
+    
+    if (options.isHelpEnabled()) {
+      configError = true;
+    }
+    
+    if (!configError && options.getUnrecognizedOptions() != null) {
+      configError = true;
+      logError("Unrecognized Options: " + options.getUnrecognizedOptions().toString());
+    }
+    
+    if (configError) {
+      jc.usage();
       return true;
     }
     
+    setDebugging(options.isDebugEnabled());
+    authTimeout = options.getAuthTimeout() * 60 * 1000; // convert minutes to milliseconds
+    disableAuthTimeout = options.isAuthTimeoutDisabled();
+    
     // get the options that were parsed
-    String sysUser = System.getProperty("user.name");
-    if (sysUser == null)
-      sysUser = "root";
-    String user = cl.getOptionValue(usernameOption.getOpt(), sysUser);
-    
-    String passw = cl.getOptionValue(passwOption.getOpt(), null);
-    tabCompletion = !cl.hasOption(tabCompleteOption.getLongOpt());
-    String[] loginOptions = cl.getOptionValues(loginOption.getOpt());
+    String user = options.getUsername();
+    String password = options.getPassword();
+    
+    tabCompletion = !options.isTabCompletionDisabled();
     
     // Use a fake (Mock), ZK, or HdfsZK Accumulo instance
-    setInstance(cl);
+    setInstance(options);
+    
+    // AuthenticationToken options
+    token = options.getAuthenticationToken();
+    Map<String,String> loginOptions = options.getTokenProperties();
     
     // process default parameters if unspecified
     try {
-      if (loginOptions != null && !cl.hasOption(tokenOption.getOpt()))
-        throw new IllegalArgumentException("Must supply '-" + tokenOption.getOpt() + "' option
with '-" + loginOption.getOpt() + "' option");
+      boolean hasToken = (token != null);
+      boolean hasTokenOptions = loginOptions != null && !loginOptions.isEmpty();
       
-      if (loginOptions == null && cl.hasOption(tokenOption.getOpt()))
-        throw new IllegalArgumentException("Must supply '-" + loginOption.getOpt() + "' option
with '-" + tokenOption.getOpt() + "' option");
-      
-      if (passw != null && cl.hasOption(tokenOption.getOpt()))
-        throw new IllegalArgumentException("Can not supply '-" + passwOption.getOpt() + "'
option with '-" + tokenOption.getOpt() + "' option");
+      // Need either both a token and options, or neither, but not just one.
+      if (hasToken != hasTokenOptions) {
+        throw new ParameterException("Must supply either both or neither of '--tokenClass'
and '--tokenProperty'");
+      }
       
-      if (user == null)
-        throw new MissingArgumentException(usernameOption);
+      if (hasToken && password != null) {
+        throw new ParameterException("Can not supply '--pass' option with '--tokenClass'
option");
+      }
       
-      if (loginOptions != null && cl.hasOption(tokenOption.getOpt())) {
-        Properties props = new Properties();
-        for (String loginOption : loginOptions)
-          for (String lo : loginOption.split(",")) {
-            String[] split = lo.split("=");
-            props.put(split[0], split[1]);
-          }
+      if (hasToken && hasTokenOptions) {
+        // Fully qualified name so we don't shadow java.util.Properties
+        org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties props;
+        // and line wrap it because the package name is so long
+        props = new org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Properties();
         
-        this.token = Class.forName(cl.getOptionValue(tokenOption.getOpt())).asSubclass(AuthenticationToken.class).newInstance();
-        this.token.init(props);
+        props.putAllStrings(loginOptions);
+        token.init(props);
       }
       
-      if (!cl.hasOption(fakeOption.getLongOpt())) {
-        DistributedTrace.enable(instance, new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()),
"shell", InetAddress.getLocalHost()
-            .getHostName());
+      if (!options.isFake()) {
+        ZooReader zr = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+        DistributedTrace.enable(instance, zr, "shell", InetAddress.getLocalHost().getHostName());
       }
       
       Runtime.getRuntime().addShutdownHook(new Thread() {
         @Override
-        public void start() {
+        public void run() {
           reader.getTerminal().setEchoEnabled(true);
         }
       });
       
-      if (passw != null) {
-        this.token = new PasswordToken(passw);
-      }
-      
-      if (this.token == null) {
-        passw = readMaskedLine("Password: ", '*');
-        if (passw != null)
-          this.token = new PasswordToken(passw);
+      if (!hasToken) {
+        if (password == null) {
+          password = reader.readLine("Password: ", '*');
+        }
+        
+        if (password == null) {
+          // User cancel, e.g. Ctrl-D pressed
+          throw new ParameterException("No password or token option supplied");
+        } else {
+          this.token = new PasswordToken(password);
+        }
       }
       
-      if (this.token == null) {
-        reader.println();
-        throw new MissingArgumentException("No password or token option supplied");
-      } // user canceled
-      
       this.setTableName("");
       this.principal = user;
       connector = instance.getConnector(this.principal, token);
@@ -322,14 +320,15 @@ public class Shell extends ShellOptions 
     }
     
     // decide whether to execute commands from a file and quit
-    if (cl.hasOption(execfileOption.getOpt())) {
-      execFile = cl.getOptionValue(execfileOption.getOpt());
+    if (options.getExecFile() != null) {
+      execFile = options.getExecFile();
       verbose = false;
-    } else if (cl.hasOption(execfileVerboseOption.getOpt())) {
-      execFile = cl.getOptionValue(execfileVerboseOption.getOpt());
+    } else if (options.getExecFileVerbose() != null) {
+      execFile = options.getExecFileVerbose();
+      verbose = true;
     }
-    if (cl.hasOption(execCommandOpt.getOpt())) {
-      execCommand = cl.getOptionValue(execCommandOpt.getOpt());
+    execCommand = options.getExecCommand();
+    if (execCommand != null) {
       verbose = false;
     }
     
@@ -378,18 +377,18 @@ public class Shell extends ShellOptions 
     return configError;
   }
   
-  protected void setInstance(CommandLine cl) {
+  protected void setInstance(ShellOptionsJC options) {
     // should only be one instance option set
     instance = null;
-    if (cl.hasOption(fakeOption.getLongOpt())) {
+    if (options.isFake()) {
       instance = new MockInstance("fake");
-    } else if (cl.hasOption(hdfsZooInstance.getOpt())) {
+    } else if (options.isHdfsZooInstance()) {
       @SuppressWarnings("deprecation")
       AccumuloConfiguration deprecatedSiteConfiguration = AccumuloConfiguration.getSiteConfiguration();
       instance = getDefaultInstance(deprecatedSiteConfiguration);
-    } else if (cl.hasOption(zooKeeperInstance.getOpt())) {
-      String[] zkOpts = cl.getOptionValues(zooKeeperInstance.getOpt());
-      instance = new ZooKeeperInstance(zkOpts[0], zkOpts[1]);
+    } else if (options.getZooKeeperInstance().size() > 0) {
+      List<String> zkOpts = options.getZooKeeperInstance();
+      instance = new ZooKeeperInstance(zkOpts.get(0), zkOpts.get(1));
     } else {
       @SuppressWarnings("deprecation")
       AccumuloConfiguration deprecatedSiteConfiguration = AccumuloConfiguration.getSiteConfiguration();
@@ -459,7 +458,7 @@ public class Shell extends ShellOptions 
     ShellCompletor userCompletor = null;
     
     if (execFile != null) {
-      java.util.Scanner scanner = new java.util.Scanner(new File(execFile));
+      java.util.Scanner scanner = new java.util.Scanner(execFile);
       try {
         while (scanner.hasNextLine() && !hasExited()) {
           execCommand(scanner.nextLine(), true, isVerbose());
@@ -843,7 +842,7 @@ public class Shell extends ShellOptions 
       writer.close();
     }
   };
-
+  
   public final void printLines(Iterator<String> lines, boolean paginate) throws IOException
{
     printLines(lines, paginate, null);
   }
@@ -1074,7 +1073,7 @@ public class Shell extends ShellOptions 
   public boolean hasExited() {
     return exit;
   }
-
+  
   public boolean isTabCompletion() {
     return tabCompletion;
   }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptions.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptions.java?rev=1490272&r1=1490271&r2=1490272&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptions.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptions.java
Thu Jun  6 13:22:22 2013
@@ -17,87 +17,16 @@
 package org.apache.accumulo.core.util.shell;
 
 import org.apache.commons.cli.Option;
-import org.apache.commons.cli.OptionGroup;
-import org.apache.commons.cli.Options;
 
 /**
  * Abstract class to encompass the Options available on the Accumulo Shell
  */
 public abstract class ShellOptions {
-  protected static final String DEFAULT_AUTH_TIMEOUT = "60"; // in minutes
-  
   // Global options flags
   public static final String userOption = "u";
   public static final String tableOption = "t";
   public static final String helpOption = "?";
   public static final String helpLongOption = "help";
   
-  final Options opts = new Options();
-  
-  final Option usernameOption = new Option("u", "user", true, "username (defaults to your
OS user)");
-  final Option passwOption = new Option("p", "password", true, "password (prompt for password
if this option is missing)");
-  final Option tokenOption = new Option("tc", "tokenClass", true, "token type to create,
use the -l to pass options");
-  final Option loginOption = new Option("l", "tokenProperty", true,
-      "login properties in the format key=value. Reuse -l for each property and/or comma
seperate (prompt for properties if this option is missing");
-  
-  final Option tabCompleteOption = new Option(null, "disable-tab-completion", false, "disables
tab completion (for less overhead when scripting)");
-  final Option debugOption = new Option(null, "debug", false, "enables client debugging");
-  final Option fakeOption = new Option(null, "fake", false, "fake a connection to accumulo");
   final Option helpOpt = new Option(helpOption, helpLongOption, false, "display this help");
-  final Option execCommandOpt = new Option("e", "execute-command", true, "executes a command,
and then exits");
-  final OptionGroup execFileGroup = new OptionGroup();
-  final Option execfileOption = new Option("f", "execute-file", true, "executes commands
from a file at startup");
-  final Option execfileVerboseOption = new Option("fv", "execute-file-verbose", true, "executes
commands from a file at startup, with commands shown");
-  final OptionGroup instanceOptions = new OptionGroup();
-  final Option hdfsZooInstance = new Option("h", "hdfsZooInstance", false, "use hdfs zoo
instance");
-  final Option zooKeeperInstance = new Option("z", "zooKeeperInstance", true, "use a zookeeper
instance with the given instance name and list of zoo hosts");
-  final OptionGroup authTimeoutOptions = new OptionGroup();
-  final Option authTimeoutOpt = new Option(null, "auth-timeout", true, "minutes the shell
can be idle without re-entering a password (default "
-      + DEFAULT_AUTH_TIMEOUT + " min)");
-  final Option disableAuthTimeoutOpt = new Option(null, "disable-auth-timeout", false, "disables
requiring the user to re-type a password after being idle");
-
-  public ShellOptions() {
-    usernameOption.setArgName("user");
-    opts.addOption(usernameOption);
-    
-    passwOption.setArgName("pass");
-    opts.addOption(passwOption);
-    opts.addOption(loginOption);
-    opts.addOption(tokenOption);
-    
-    opts.addOption(tabCompleteOption);
-    
-    opts.addOption(debugOption);
-    
-    opts.addOption(fakeOption);
-    
-    opts.addOption(helpOpt);
-    
-    opts.addOption(execCommandOpt);
-    
-    
-    execfileOption.setArgName("file");
-    execFileGroup.addOption(execfileOption);
-    
-    execfileVerboseOption.setArgName("file");
-    execFileGroup.addOption(execfileVerboseOption);
-    
-    opts.addOptionGroup(execFileGroup);
-    
-    
-    instanceOptions.addOption(hdfsZooInstance);
-    
-    zooKeeperInstance.setArgName("name hosts");
-    zooKeeperInstance.setArgs(2);
-    instanceOptions.addOption(zooKeeperInstance);
-    
-    opts.addOptionGroup(instanceOptions);
-    
-    authTimeoutOpt.setArgName("minutes");
-    authTimeoutOptions.addOption(authTimeoutOpt);
-    
-    authTimeoutOptions.addOption(disableAuthTimeoutOpt);
-    
-    opts.addOptionGroup(authTimeoutOptions);
-  }
 }

Added: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java?rev=1490272&view=auto
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
(added)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
Thu Jun  6 13:22:22 2013
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.core.util.shell;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
+
+import com.beust.jcommander.DynamicParameter;
+import com.beust.jcommander.IStringConverter;
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.ParameterException;
+import com.beust.jcommander.converters.FileConverter;
+
+public class ShellOptionsJC {
+  @Parameter(names = {"-u", "--user"}, description = "username (defaults to your OS user)")
+  private String username = System.getProperty("user.name", "root");
+  
+  // Note: Don't use "password = true" because then it will prompt even if we have a token
+  @Parameter(names = {"-p", "--password"}, description = "password (prompt for password if
this option is missing)")
+  private String password;
+  
+  private static class TokenConverter implements IStringConverter<AuthenticationToken>
{
+    @Override
+    public AuthenticationToken convert(String value) {
+      try {
+        return Class.forName(value).asSubclass(AuthenticationToken.class).newInstance();
+      } catch (Exception e) {
+        // Catching ClassNotFoundException, ClassCastException, InstantiationException and
IllegalAccessException
+        throw new ParameterException(e);
+      }
+    }
+  }
+  
+  @Parameter(names = {"-tc", "--tokenClass"}, description = "token type to create, use the
-l to pass options", converter = TokenConverter.class)
+  private AuthenticationToken authenticationToken;
+  
+  @DynamicParameter(names = {"-l", "--tokenProperty"}, description = "login properties in
the format key=value. Reuse -l for each property")
+  private Map<String,String> tokenProperties;
+  
+  @Parameter(names = "--disable-tab-completion", description = "disables tab completion (for
less overhead when scripting)")
+  private boolean tabCompletionDisabled;
+  
+  @Parameter(names = "--debug", description = "enables client debugging")
+  private boolean debugEnabled;
+  
+  @Parameter(names = "--fake", description = "fake a connection to accumulo")
+  private boolean fake;
+  
+  @Parameter(names = {"-?", "--help"}, help = true, description = "display this help")
+  private boolean helpEnabled;
+  
+  @Parameter(names = {"-e", "--execute-command"}, description = "executes a command, and
then exits")
+  private String execCommand;
+  
+  @Parameter(names = {"-f", "--execute-file"}, description = "executes commands from a file
at startup", converter = FileConverter.class)
+  private File execFile;
+  
+  @Parameter(names = {"-fv", "--execute-file-verbose"}, description = "executes commands
from a file at startup, with commands shown",
+      converter = FileConverter.class)
+  private File execFileVerbose;
+  
+  @Parameter(names = {"-h", "--hdfsZooInstance"}, description = "use hdfs zoo instance")
+  private boolean hdfsZooInstance;
+  
+  @Parameter(names = {"-z", "--zooKeeperInstance"}, description = "use a zookeeper instance
with the given instance name and list of zoo hosts", arity = 2)
+  private List<String> zooKeeperInstance;
+  
+  @Parameter(names = "--auth-timeout", description = "minutes the shell can be idle without
re-entering a password")
+  private int authTimeout = 60; // TODO Add validator for positive number
+  
+  @Parameter(names = "--disable-auth-timeout", description = "disables requiring the user
to re-type a password after being idle")
+  private boolean authTimeoutDisabled;
+  
+  @Parameter(hidden = true)
+  private List<String> unrecognizedOptions;
+  
+  public String getUsername() {
+    return username;
+  }
+  
+  public String getPassword() {
+    return password;
+  }
+  
+  public AuthenticationToken getAuthenticationToken() {
+    return authenticationToken;
+  }
+  
+  public Map<String,String> getTokenProperties() {
+    return tokenProperties;
+  }
+  
+  public boolean isTabCompletionDisabled() {
+    return tabCompletionDisabled;
+  }
+  
+  public boolean isDebugEnabled() {
+    return debugEnabled;
+  }
+  
+  public boolean isFake() {
+    return fake;
+  }
+  
+  public boolean isHelpEnabled() {
+    return helpEnabled;
+  }
+  
+  public String getExecCommand() {
+    return execCommand;
+  }
+  
+  public File getExecFile() {
+    return execFile;
+  }
+  
+  public File getExecFileVerbose() {
+    return execFileVerbose;
+  }
+  
+  public boolean isHdfsZooInstance() {
+    return hdfsZooInstance;
+  }
+  
+  public List<String> getZooKeeperInstance() {
+    return zooKeeperInstance;
+  }
+  
+  public int getAuthTimeout() {
+    return authTimeout;
+  }
+  
+  public boolean isAuthTimeoutDisabled() {
+    return authTimeoutDisabled;
+  }
+  
+  public List<String> getUnrecognizedOptions() {
+    return unrecognizedOptions;
+  }
+}

Propchange: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message