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
FieldsFields 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
ConstructorsConstructorDescriptionDisabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices masterServices, SnapshotManager snapshotManager) -
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.voidsnapshotRegions(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, snapshotDisabledRegionMethods 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: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
public void snapshotRegions(List<Pair<RegionInfo, ServerName>> regionsAndLocations) throws IOException, org.apache.zookeeper.KeeperExceptionDescription copied from class:TakeSnapshotHandlerSnapshot the specified regions- Specified by:
snapshotRegionsin classTakeSnapshotHandler- Throws:
IOExceptionorg.apache.zookeeper.KeeperException
-