Class ScanCommand
- java.lang.Object
-
- org.apache.accumulo.shell.Shell.Command
-
- org.apache.accumulo.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.shell.Shell.Command
Shell.Command.CompletionSet
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.cli.OptionprofileOptprotected org.apache.commons.cli.OptiontimestampOpt
-
Constructor Summary
Constructors Constructor Description ScanCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddScanIterators(Shell shellState, org.apache.commons.cli.CommandLine cl, ScannerBase scanner, String tableName)Stringdescription()intexecute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState)protected voidfetchColumns(org.apache.commons.cli.CommandLine cl, ScannerBase scanner, ScanInterpreter formatter)protected AuthorizationsgetAuths(org.apache.commons.cli.CommandLine cl, Shell shellState)protected ScannerBase.ConsistencyLevelgetConsistency(org.apache.commons.cli.CommandLine cl)protected Class<? extends Formatter>getFormatter(org.apache.commons.cli.CommandLine cl, String tableName, Shell shellState)protected ScanInterpretergetInterpreter(org.apache.commons.cli.CommandLine cl, String tableName, Shell shellState)Deprecated.org.apache.commons.cli.OptionsgetOptions()protected Shell.PrintFilegetOutputFile(org.apache.commons.cli.CommandLine cl)protected RangegetRange(org.apache.commons.cli.CommandLine cl, ScanInterpreter formatter)protected longgetTimeout(org.apache.commons.cli.CommandLine cl)protected booleangetUseSample(org.apache.commons.cli.CommandLine cl)intnumArgs()If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override theShell.Command.usage()method.protected voidprintRecords(org.apache.commons.cli.CommandLine cl, Shell shellState, FormatterConfig config, Iterable<Map.Entry<Key,Value>> scanner, Class<? extends Formatter> formatter, Shell.PrintFile outFile)protected voidsetupSampling(String tableName, org.apache.commons.cli.CommandLine cl, Shell shellState, ScannerBase scanner)-
Methods inherited from class org.apache.accumulo.shell.Shell.Command
getName, getOptionsWithHelp, printHelp, printHelp, registerCompletion, registerCompletionForCommands, registerCompletionForNamespaces, registerCompletionForTables, registerCompletionForUsers, registerCompletionGeneral, usage
-
-
-
-
Method Detail
-
setupSampling
protected void setupSampling(String tableName, org.apache.commons.cli.CommandLine cl, Shell shellState, ScannerBase scanner) throws TableNotFoundException, AccumuloException, AccumuloSecurityException
-
getConsistency
protected ScannerBase.ConsistencyLevel getConsistency(org.apache.commons.cli.CommandLine cl)
-
execute
public int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState) throws Exception
- Specified by:
executein classShell.Command- Throws:
Exception
-
getUseSample
protected boolean getUseSample(org.apache.commons.cli.CommandLine cl)
-
getTimeout
protected long getTimeout(org.apache.commons.cli.CommandLine cl)
-
addScanIterators
protected void addScanIterators(Shell shellState, org.apache.commons.cli.CommandLine cl, ScannerBase scanner, String tableName) throws Exception
- Throws:
Exception
-
printRecords
protected void printRecords(org.apache.commons.cli.CommandLine cl, Shell shellState, FormatterConfig config, Iterable<Map.Entry<Key,Value>> scanner, Class<? extends Formatter> formatter, Shell.PrintFile outFile) throws IOException- Throws:
IOException
-
getInterpreter
@Deprecated(since="2.1.0") protected ScanInterpreter getInterpreter(org.apache.commons.cli.CommandLine cl, String tableName, Shell shellState) throws Exception
Deprecated.- 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
-
description
public String description()
- Specified by:
descriptionin classShell.Command
-
getOptions
public org.apache.commons.cli.Options getOptions()
- Overrides:
getOptionsin classShell.Command
-
numArgs
public int numArgs()
Description copied from class:Shell.CommandIf the number of arguments is not always zero (not including those arguments handled through Options), make sure to override theShell.Command.usage()method. Otherwise,Shell.Command.usage()does need to be overridden.- Specified by:
numArgsin classShell.Command
-
getOutputFile
protected Shell.PrintFile getOutputFile(org.apache.commons.cli.CommandLine cl) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-