org.apache.hadoop.hbase.master.snapshot
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<Runnable>, Runnable, ForeignExceptionSnare, SnapshotSentinel
@InterfaceAudience.Private
@InterfaceStability.Evolving
public class DisabledTableSnapshotHandler
- extends TakeSnapshotHandler
Take a snapshot of a disabled table.
Table must exist when taking the snapshot, or results are undefined.
Fields inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler |
conf, fs, htd, master, metricsSnapshot, monitor, rootDir, snapshot, snapshotManifest, snapshotTable, status, tableLock, tableLockManager, workingDir |
Methods inherited from class org.apache.hadoop.hbase.master.snapshot.TakeSnapshotHandler |
cancel, completeSnapshot, getCompletionTimestamp, getException, getExceptionIfFailed, getSnapshot, hasException, isFinished, process, releaseTableLock, rethrowException, rethrowExceptionIfFailed, snapshotDisabledRegion |
DisabledTableSnapshotHandler
public DisabledTableSnapshotHandler(HBaseProtos.SnapshotDescription snapshot,
MasterServices masterServices)
- Parameters:
snapshot
- descriptor of the snapshot to takemasterServices
- master services provider
prepare
public DisabledTableSnapshotHandler prepare()
throws Exception
- 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 class TakeSnapshotHandler
- Returns:
- the instance of this class
- Throws:
Exception
- when something goes wrong
snapshotRegions
public void snapshotRegions(List<Pair<HRegionInfo,ServerName>> regionsAndLocations)
throws IOException,
org.apache.zookeeper.KeeperException
- Description copied from class:
TakeSnapshotHandler
- Snapshot the specified regions
- Specified by:
snapshotRegions
in class TakeSnapshotHandler
- Throws:
IOException
org.apache.zookeeper.KeeperException
Copyright © 2015 The Apache Software Foundation. All rights reserved.