Class ScanCommand
java.lang.Object
org.apache.accumulo.shell.Shell.Command
org.apache.accumulo.shell.commands.ScanCommand
- Direct Known Subclasses:
DeleteManyCommand,GrepCommand,MaxRowCommand
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.accumulo.shell.Shell.Command
Shell.Command.CompletionSet -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.commons.cli.Optionprotected org.apache.commons.cli.Optionprotected org.apache.commons.cli.Option -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddScanIterators(Shell shellState, org.apache.commons.cli.CommandLine cl, ScannerBase scanner, String tableName) intprotected voidfetchColumns(org.apache.commons.cli.CommandLine cl, ScannerBase scanner, ScanInterpreter interpreter) protected Authorizationsprotected ScannerBase.ConsistencyLevelgetConsistency(org.apache.commons.cli.CommandLine cl) 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.Optionsprotected 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
-
Field Details
-
showFewOpt
protected org.apache.commons.cli.Option showFewOpt -
timestampOpt
protected org.apache.commons.cli.Option timestampOpt -
profileOpt
protected org.apache.commons.cli.Option profileOpt
-
-
Constructor Details
-
ScanCommand
public ScanCommand()
-
-
Method Details
-
setupSampling
protected void setupSampling(String tableName, org.apache.commons.cli.CommandLine cl, Shell shellState, ScannerBase scanner) throws TableNotFoundException, AccumuloException, AccumuloSecurityException -
getConsistency
-
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 interpreter) 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
- 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
-