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
FieldsModifier and TypeFieldDescriptionprivate final ProcedureCoordinatorprivate static final org.slf4j.LoggerFields 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, workingDirFsFields inherited from class org.apache.hadoop.hbase.executor.EventHandler
eventType, seqids, server, waitingTimeForEvents -
Constructor Summary
ConstructorsConstructorDescriptionEnabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanWhen 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 voidsnapshotMobRegion(RegionInfo regionInfo) Takes a snapshot of the mob regionprotected voidsnapshotRegions(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, snapshotDisabledRegionMethods 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:EventHandlerEvent 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:
preparein 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:
snapshotRegionsin classTakeSnapshotHandler- Throws:
IOException
-
snapshotMobRegion
Takes a snapshot of the mob region- Throws:
IOException
-