org.apache.hadoop.hbase.master.handler
Class TruncateTableHandler

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.EventHandler
      extended by org.apache.hadoop.hbase.master.handler.TableEventHandler
          extended by org.apache.hadoop.hbase.master.handler.DeleteTableHandler
              extended by org.apache.hadoop.hbase.master.handler.TruncateTableHandler
All Implemented Interfaces:
Comparable<Runnable>, Runnable

@InterfaceAudience.Private
public class TruncateTableHandler
extends DeleteTableHandler

Truncate the table by removing META and the HDFS files and recreating it. If the 'preserveSplits' option is set to true, the region splits are preserved on recreate. If the operation fails in the middle it may require hbck to fix the system state.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.executor.EventHandler
EventHandler.EventHandlerListener
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.master.handler.TableEventHandler
masterServices, tableLock, tableName
 
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
 
Constructor Summary
TruncateTableHandler(TableName tableName, Server server, MasterServices masterServices, boolean preserveSplits)
           
 
Method Summary
protected  void handleTableOperation(List<HRegionInfo> regions)
           
 
Methods inherited from class org.apache.hadoop.hbase.master.handler.DeleteTableHandler
prepareWithTableLock, releaseTableLock, toString
 
Methods inherited from class org.apache.hadoop.hbase.master.handler.TableEventHandler
completed, getTableDescriptor, prepare, process, reOpenAllRegions
 
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getListener, getPriority, getSeqid, handleException, run, setListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TruncateTableHandler

public TruncateTableHandler(TableName tableName,
                            Server server,
                            MasterServices masterServices,
                            boolean preserveSplits)
Method Detail

handleTableOperation

protected void handleTableOperation(List<HRegionInfo> regions)
                             throws IOException,
                                    org.apache.zookeeper.KeeperException
Overrides:
handleTableOperation in class DeleteTableHandler
Throws:
IOException
org.apache.zookeeper.KeeperException


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.