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<EventHandler>
,Runnable
,ForeignExceptionSnare
,SnapshotSentinel
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:
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ProcedureCoordinator
private static final org.slf4j.Logger
Fields inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
conf, HBASE_SNAPSHOT_MASTER_LOCK_ACQUIRE_TIMEOUT, htd, master, metricsSnapshot, monitor, rootDir, rootFs, snapshot, snapshotManager, snapshotManifest, snapshotTable, status, workingDir, workingDirFs
Fields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents
-
Constructor Summary
ConstructorDescriptionEnabledTableSnapshotHandler
(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
When taking snapshot, first we must acquire the exclusive table lock to confirm that there are no ongoing merge/split procedures.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.private void
snapshotMobRegion
(RegionInfo regionInfo) Takes a snapshot of the mob regionprotected void
snapshotRegions
(List<Pair<RegionInfo, ServerName>> regions) This method kicks off a snapshot procedure.Methods inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
cancel, getCompletionTimestamp, getException, getExceptionIfFailed, getSnapshot, hasException, isFinished, process, rethrowException, rethrowExceptionIfFailed, snapshotDisabledRegion
Methods inherited from class org.apache.hadoop.hbase.executor.EventHandler
compareTo, getEventType, getInformativeName, getPriority, getSeqid, handleException, run, toString
-
Field Details
-
LOG
-
coordinator
-
-
Constructor Details
-
EnabledTableSnapshotHandler
public EnabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager) throws IOException - Throws:
IOException
-
-
Method Details
-
prepare
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 classTakeSnapshotHandler
- Returns:
- the instance of this class
- Throws:
Exception
- when something goes wrong
-
snapshotRegions
This method kicks off a snapshot procedure. Other than that it hangs around for various phases to complete.- Specified by:
snapshotRegions
in classTakeSnapshotHandler
- Throws:
IOException
-
snapshotMobRegion
Takes a snapshot of the mob region- Throws:
IOException
-