Class DisabledTableSnapshotHandler
java.lang.Object
org.apache.hadoop.hbase.executor.EventHandler
org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler
org.apache.hadoop.hbase.master.snapshot.DisabledTableSnapshotHandler
- All Implemented Interfaces:
Comparable<EventHandler>
,Runnable
,ForeignExceptionSnare
,SnapshotSentinel
Take a snapshot of a disabled table.
Table must exist when taking the snapshot, or results are undefined.
-
Field Summary
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
ConstructorDescriptionDisabledTableSnapshotHandler
(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices masterServices, SnapshotManager snapshotManager) -
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.void
snapshotRegions
(List<Pair<RegionInfo, ServerName>> regionsAndLocations) Snapshot the specified regionsMethods 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
-
-
Constructor Details
-
DisabledTableSnapshotHandler
public DisabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices masterServices, SnapshotManager snapshotManager) throws IOException - Parameters:
snapshot
- descriptor of the snapshot to takemasterServices
- master services provider- Throws:
IOException
- if it cannot access the filesystem of the snapshot temporary directory
-
-
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
public void snapshotRegions(List<Pair<RegionInfo, ServerName>> regionsAndLocations) throws IOException, org.apache.zookeeper.KeeperExceptionDescription copied from class:TakeSnapshotHandler
Snapshot the specified regions- Specified by:
snapshotRegions
in classTakeSnapshotHandler
- Throws:
IOException
org.apache.zookeeper.KeeperException
-