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 SummaryFieldsModifier and TypeFieldDescriptionprivate final ProcedureCoordinatorprivate static final org.slf4j.LoggerFields inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandlerconf, 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.EventHandlereventType, seqids, server, waitingTimeForEvents
- 
Constructor SummaryConstructorsConstructorDescriptionEnabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager) 
- 
Method SummaryModifier 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.TakeSnapshotHandlercancel, getCompletionTimestamp, getException, getExceptionIfFailed, getSnapshot, hasException, isFinished, process, rethrowException, rethrowExceptionIfFailed, snapshotDisabledRegionMethods inherited from class org.apache.hadoop.hbase.executor.EventHandlercompareTo, getEventType, getInformativeName, getPriority, getSeqid, handleException, run, toString
- 
Field Details- 
LOG
- 
coordinator
 
- 
- 
Constructor Details- 
EnabledTableSnapshotHandlerpublic EnabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager) throws IOException - Throws:
- IOException
 
 
- 
- 
Method Details- 
prepareDescription 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 class- TakeSnapshotHandler
- Returns:
- the instance of this class
- Throws:
- Exception- when something goes wrong
 
- 
snapshotRegionsThis method kicks off a snapshot procedure. Other than that it hangs around for various phases to complete.- Specified by:
- snapshotRegionsin class- TakeSnapshotHandler
- Throws:
- IOException
 
- 
snapshotMobRegionTakes a snapshot of the mob region- Throws:
- IOException
 
 
-