org.apache.hadoop.hbase.hql
Class TruncateCommand

java.lang.Object
  extended by org.apache.hadoop.hbase.hql.BasicCommand
      extended by org.apache.hadoop.hbase.hql.TruncateCommand
All Implemented Interfaces:
Command, CommandFactory

public class TruncateCommand
extends BasicCommand

Truncate table is used to clean all data from a table.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.hql.Command
Command.CommandType
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.hql.BasicCommand
LINE_SEPARATOR, TABLE_NOT_FOUND
 
Fields inherited from interface org.apache.hadoop.hbase.hql.Command
FAMILY_INDICATOR
 
Constructor Summary
TruncateCommand(Writer o)
           
 
Method Summary
 ReturnMsg execute(HBaseConfiguration conf)
          Execute a command
 Command.CommandType getCommandType()
           
 void setTableName(String tableName)
           
 
Methods inherited from class org.apache.hadoop.hbase.hql.BasicCommand
appendDelimiter, extractErrMsg, extractErrMsg, getBasicCommand, getCommand, getOut, print, println
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TruncateCommand

public TruncateCommand(Writer o)
Method Detail

execute

public ReturnMsg execute(HBaseConfiguration conf)
Description copied from interface: Command
Execute a command

Parameters:
conf - Configuration
Returns:
Result of command execution

setTableName

public void setTableName(String tableName)

getCommandType

public Command.CommandType getCommandType()
Specified by:
getCommandType in interface Command
Overrides:
getCommandType in class BasicCommand
Returns:
Type of this command whether DDL, SELECT, INSERT, UPDATE, DELETE, or SHELL.


Copyright © 2008 The Apache Software Foundation