org.apache.accumulo.core.util.shell.commands
Class ScanCommand

java.lang.Object
  extended by org.apache.accumulo.core.util.shell.Shell.Command
      extended by org.apache.accumulo.core.util.shell.commands.ScanCommand
Direct Known Subclasses:
DeleteManyCommand, GrepCommand, MaxRowCommand

public class ScanCommand
extends Shell.Command


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.accumulo.core.util.shell.Shell.Command
Shell.Command.CompletionSet
 
Field Summary
protected  org.apache.commons.cli.Option timestampOpt
           
 
Constructor Summary
ScanCommand()
           
 
Method Summary
protected  void addScanIterators(Shell shellState, org.apache.commons.cli.CommandLine cl, Scanner scanner, String tableName)
           
 String description()
           
 int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState)
           
protected  void fetchColumns(org.apache.commons.cli.CommandLine cl, ScannerBase scanner, ScanInterpreter formatter)
           
protected  Authorizations getAuths(org.apache.commons.cli.CommandLine cl, Shell shellState)
           
protected  Class<? extends Formatter> getFormatter(org.apache.commons.cli.CommandLine cl, String tableName, Shell shellState)
           
protected  ScanInterpreter getInterpreter(org.apache.commons.cli.CommandLine cl, String tableName, Shell shellState)
           
 org.apache.commons.cli.Options getOptions()
           
protected  Range getRange(org.apache.commons.cli.CommandLine cl, ScanInterpreter formatter)
           
protected  long getTimeout(org.apache.commons.cli.CommandLine cl)
           
 int numArgs()
          If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override the Shell.Command.usage() method.
protected  void printBinaryRecords(org.apache.commons.cli.CommandLine cl, Shell shellState, Iterable<Map.Entry<Key,Value>> scanner)
           
protected  void printBinaryRecords(org.apache.commons.cli.CommandLine cl, Shell shellState, Iterable<Map.Entry<Key,Value>> scanner, Shell.PrintFile outFile)
           
protected  void printRecords(org.apache.commons.cli.CommandLine cl, Shell shellState, Iterable<Map.Entry<Key,Value>> scanner, Class<? extends Formatter> formatter)
           
protected  void printRecords(org.apache.commons.cli.CommandLine cl, Shell shellState, Iterable<Map.Entry<Key,Value>> scanner, Class<? extends Formatter> formatter, Shell.PrintFile outFile)
           
 
Methods inherited from class org.apache.accumulo.core.util.shell.Shell.Command
getName, getOptionsWithHelp, printHelp, printHelp, registerCompletion, registerCompletionForCommands, registerCompletionForTables, registerCompletionForUsers, registerCompletionGeneral, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timestampOpt

protected org.apache.commons.cli.Option timestampOpt
Constructor Detail

ScanCommand

public ScanCommand()
Method Detail

execute

public int execute(String fullCommand,
                   org.apache.commons.cli.CommandLine cl,
                   Shell shellState)
            throws Exception
Specified by:
execute in class Shell.Command
Throws:
Exception

getTimeout

protected long getTimeout(org.apache.commons.cli.CommandLine cl)

addScanIterators

protected void addScanIterators(Shell shellState,
                                org.apache.commons.cli.CommandLine cl,
                                Scanner scanner,
                                String tableName)

printRecords

protected void printRecords(org.apache.commons.cli.CommandLine cl,
                            Shell shellState,
                            Iterable<Map.Entry<Key,Value>> scanner,
                            Class<? extends Formatter> formatter)
                     throws IOException
Throws:
IOException

printRecords

protected void printRecords(org.apache.commons.cli.CommandLine cl,
                            Shell shellState,
                            Iterable<Map.Entry<Key,Value>> scanner,
                            Class<? extends Formatter> formatter,
                            Shell.PrintFile outFile)
                     throws IOException
Throws:
IOException

printBinaryRecords

protected void printBinaryRecords(org.apache.commons.cli.CommandLine cl,
                                  Shell shellState,
                                  Iterable<Map.Entry<Key,Value>> scanner)
                           throws IOException
Throws:
IOException

printBinaryRecords

protected void printBinaryRecords(org.apache.commons.cli.CommandLine cl,
                                  Shell shellState,
                                  Iterable<Map.Entry<Key,Value>> scanner,
                                  Shell.PrintFile outFile)
                           throws IOException
Throws:
IOException

getInterpreter

protected ScanInterpreter getInterpreter(org.apache.commons.cli.CommandLine cl,
                                         String tableName,
                                         Shell shellState)
                                  throws Exception
Throws:
Exception

getFormatter

protected Class<? extends Formatter> getFormatter(org.apache.commons.cli.CommandLine cl,
                                                  String tableName,
                                                  Shell shellState)
                                           throws IOException
Throws:
IOException

fetchColumns

protected void fetchColumns(org.apache.commons.cli.CommandLine cl,
                            ScannerBase scanner,
                            ScanInterpreter formatter)
                     throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

getRange

protected Range getRange(org.apache.commons.cli.CommandLine cl,
                         ScanInterpreter formatter)
                  throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

getAuths

protected Authorizations getAuths(org.apache.commons.cli.CommandLine cl,
                                  Shell shellState)
                           throws AccumuloSecurityException,
                                  AccumuloException
Throws:
AccumuloSecurityException
AccumuloException

description

public String description()
Specified by:
description in class Shell.Command

getOptions

public org.apache.commons.cli.Options getOptions()
Overrides:
getOptions in class Shell.Command

numArgs

public int numArgs()
Description copied from class: Shell.Command
If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override the Shell.Command.usage() method. Otherwise, Shell.Command.usage() does need to be overridden.

Specified by:
numArgs in class Shell.Command


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.