org.apache.hadoop.hbase.master.snapshot
Class EnabledTableSnapshotHandler
java.lang.Object
org.apache.hadoop.hbase.executor.EventHandler
org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
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
EnabledTableSnapshotHandler
public EnabledTableSnapshotHandler(HBaseProtos.SnapshotDescription snapshot,
MasterServices master,
SnapshotManager manager)
throws IOException
- Throws:
IOException
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.