org.apache.hadoop.hbase.hql
Class BasicCommand
java.lang.Object
org.apache.hadoop.hbase.hql.BasicCommand
- All Implemented Interfaces:
- Command, CommandFactory
- Direct Known Subclasses:
- ClearCommand, DeleteCommand, DescCommand, DisableCommand, DropCommand, EnableCommand, ExitCommand, FsCommand, HelpCommand, InsertCommand, JarCommand, SchemaModificationCommand, SelectCommand, ShowCommand, TruncateCommand
public abstract class BasicCommand
- extends Object
- implements Command, CommandFactory
Takes the lowest-common-denominator Writer
doing its own printlns,
etc.
- See Also:
- HBaseShell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.hbase.hql.Command |
execute |
LINE_SEPARATOR
public final String LINE_SEPARATOR
TABLE_NOT_FOUND
public final String TABLE_NOT_FOUND
- See Also:
- Constant Field Values
BasicCommand
public BasicCommand(Writer o)
- Constructor
- Parameters:
o
- A Writer.
getBasicCommand
public BasicCommand getBasicCommand()
getCommand
public Command getCommand()
- basic commands are their own factories.
- Specified by:
getCommand
in interface CommandFactory
extractErrMsg
protected String extractErrMsg(String msg)
extractErrMsg
protected String extractErrMsg(Exception e)
appendDelimiter
protected String appendDelimiter(String column)
- Appends, if it does not exist, a delimiter (colon) at the end of the column
name.
getOut
public Writer getOut()
- Returns:
- Writer to use outputting.
print
public void print(String msg)
throws IOException
- Throws:
IOException
println
public void println(String msg)
throws IOException
- Throws:
IOException
getCommandType
public Command.CommandType getCommandType()
- Specified by:
getCommandType
in interface Command
- Returns:
- Type of this command whether DDL, SELECT, INSERT, UPDATE, DELETE,
or SHELL.
Copyright © 2006 The Apache Software Foundation