org.apache.hadoop.hbase.master.snapshot
Class DisabledTableSnapshotHandler

java.lang.Object
  extended by org.apache.hadoop.hbase.executor.EventHandler
      extended by org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
          extended by org.apache.hadoop.hbase.master.snapshot.DisabledTableSnapshotHandler
All Implemented Interfaces:
Comparable<Runnable>, Runnable, ForeignExceptionSnare, SnapshotSentinel

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class DisabledTableSnapshotHandler
extends TakeSnapshotHandler

Take a snapshot of a disabled table.

Table must exist when taking the snapshot, or results are undefined.


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.snapshot.TakeSnapshotHandler
conf, fs, htd, master, metricsSnapshot, monitor, rootDir, snapshot, snapshotManifest, snapshotTable, status, tableLock, tableLockManager, workingDir
 
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
 
Constructor Summary
DisabledTableSnapshotHandler(HBaseProtos.SnapshotDescription snapshot, MasterServices masterServices)
           
 
Method Summary
 DisabledTableSnapshotHandler prepare()
          Event handlers should do all the necessary checks in this method (rather than in the constructor, or in process()) so that the caller, which is mostly executed in the ipc context can fail fast.
 void snapshotRegions(List<Pair<HRegionInfo,ServerName>> regionsAndLocations)
          Snapshot the specified regions
 
Methods inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
cancel, completeSnapshot, getCompletionTimestamp, getException, getExceptionIfFailed, getSnapshot, hasException, isFinished, process, releaseTableLock, rethrowException, rethrowExceptionIfFailed, snapshotDisabledRegion
 
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getListener, getPriority, getSeqid, handleException, run, setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisabledTableSnapshotHandler

public DisabledTableSnapshotHandler(HBaseProtos.SnapshotDescription snapshot,
                                    MasterServices masterServices)
Parameters:
snapshot - descriptor of the snapshot to take
masterServices - master services provider
Method Detail

prepare

public DisabledTableSnapshotHandler prepare()
                                     throws Exception
Description copied from class: EventHandler
Event handlers should do all the necessary checks in this method (rather than in the constructor, or in process()) so that the caller, which is mostly executed in the ipc context can fail fast. Process is executed async from the client ipc, so this method gives a quick chance to do some basic checks. Should be called after constructing the EventHandler, and before process().

Overrides:
prepare in class TakeSnapshotHandler
Returns:
the instance of this class
Throws:
Exception - when something goes wrong

snapshotRegions

public void snapshotRegions(List<Pair<HRegionInfo,ServerName>> regionsAndLocations)
                     throws IOException,
                            org.apache.zookeeper.KeeperException
Description copied from class: TakeSnapshotHandler
Snapshot the specified regions

Specified by:
snapshotRegions in class TakeSnapshotHandler
Throws:
IOException
org.apache.zookeeper.KeeperException


Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.