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

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.EnabledTableSnapshotHandler
All Implemented Interfaces:
Comparable<Runnable>, Runnable, ForeignExceptionSnare, SnapshotSentinel

@InterfaceAudience.Private
public class EnabledTableSnapshotHandler
extends TakeSnapshotHandler

Handle the master side of taking a snapshot of an online table, regardless of snapshot type. Uses a Procedure to run the snapshot across all the involved region servers.

See Also:
ProcedureCoordinator

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, master, monitor, rootDir, snapshot, tableLock, tableLockManager, workingDir
 
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
 
Constructor Summary
EnabledTableSnapshotHandler(HBaseProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager)
           
 
Method Summary
 EnabledTableSnapshotHandler 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.
protected  void snapshotRegions(List<Pair<HRegionInfo,ServerName>> regions)
          This method kicks off a snapshot procedure.
 
Methods inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
cancel, completeSnapshot, getException, getExceptionIfFailed, getSnapshot, hasException, isFinished, process, releaseTableLock, rethrowException
 
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getListener, getPriority, getSeqid, run, setListener, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnabledTableSnapshotHandler

public EnabledTableSnapshotHandler(HBaseProtos.SnapshotDescription snapshot,
                                   MasterServices master,
                                   SnapshotManager manager)
                            throws IOException
Throws:
IOException
Method Detail

prepare

public EnabledTableSnapshotHandler 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

protected void snapshotRegions(List<Pair<HRegionInfo,ServerName>> regions)
                        throws HBaseSnapshotException
This method kicks off a snapshot procedure. Other than that it hangs around for various phases to complete.

Specified by:
snapshotRegions in class TakeSnapshotHandler
Throws:
HBaseSnapshotException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.