@InterfaceAudience.Private public class EnabledTableSnapshotHandler extends TakeSnapshotHandler
Procedure
to run the snapshot across all the involved region servers.ProcedureCoordinator
Modifier and Type | Field and Description |
---|---|
private ProcedureCoordinator |
coordinator |
private static org.slf4j.Logger |
LOG |
conf, htd, master, metricsSnapshot, monitor, rootDir, rootFs, snapshot, snapshotManager, snapshotManifest, snapshotTable, status, workingDir, workingDirFs
eventType, seqids, server, waitingTimeForEvents
Constructor and Description |
---|
EnabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot,
MasterServices master,
SnapshotManager manager) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
downgradeToSharedTableLock()
When taking snapshot, first we must acquire the exclusive table lock to confirm that there are
no ongoing merge/split procedures.
|
EnabledTableSnapshotHandler |
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 void |
snapshotMobRegion(RegionInfo regionInfo)
Takes a snapshot of the mob region
|
protected void |
snapshotRegions(List<Pair<RegionInfo,ServerName>> regions)
This method kicks off a snapshot procedure.
|
cancel, getCompletionTimestamp, getException, getExceptionIfFailed, getSnapshot, hasException, isFinished, process, rethrowException, rethrowExceptionIfFailed, snapshotDisabledRegion
compareTo, getEventType, getInformativeName, getPriority, getSeqid, handleException, run, toString
private static final org.slf4j.Logger LOG
private final ProcedureCoordinator coordinator
public EnabledTableSnapshotHandler(org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, MasterServices master, SnapshotManager manager) throws IOException
IOException
public EnabledTableSnapshotHandler prepare() throws Exception
EventHandler
prepare
in class TakeSnapshotHandler
Exception
- when something goes wrongprotected void snapshotRegions(List<Pair<RegionInfo,ServerName>> regions) throws IOException
snapshotRegions
in class TakeSnapshotHandler
IOException
private void snapshotMobRegion(RegionInfo regionInfo) throws IOException
IOException
protected boolean downgradeToSharedTableLock()
TakeSnapshotHandler
downgradeToSharedTableLock
in class TakeSnapshotHandler
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.