Class FlushSnapshotSubprocedure
java.lang.Object
org.apache.hadoop.hbase.procedure.Subprocedure
org.apache.hadoop.hbase.regionserver.snapshot.FlushSnapshotSubprocedure
This online snapshot implementation uses the distributed procedure framework to force a store
flush and then records the hfiles. Its enter stage does nothing. Its leave stage then flushes the
memstore, builds the region server's snapshot manifest from its hfiles list, and copies
.regioninfos into the snapshot working directory. At the master side, there is an atomic rename
of the working dir into the proper snapshot directory.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Callable for adding files to snapshot manifest working dir.Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
Subprocedure.SubprocedureImpl
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
(package private) static final int
private final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription
private boolean
private final RegionServerSnapshotManager.SnapshotSubprocedurePool
Fields inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
executionTimeoutTimer, monitor, rpcs, wakeFrequency
-
Constructor Summary
ConstructorDescriptionFlushSnapshotSubprocedure
(ProcedureMember member, ForeignExceptionDispatcher errorListener, long wakeFrequency, long timeout, List<HRegion> regions, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, RegionServerSnapshotManager.SnapshotSubprocedurePool taskManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
do nothing, core of snapshot is executed ininsideBarrier()
step.void
Cancel threads if they haven't finished.private void
byte[]
do a flush snapshot of every region on this rs from the target table.void
Hooray!Methods inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
call, cancel, getMemberName, getName, receiveReachedGlobalBarrier, waitForLocallyCompleted
-
Field Details
-
LOG
-
regions
-
snapshot
private final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot -
taskManager
-
snapshotSkipFlush
-
MAX_RETRIES
- See Also:
-
-
Constructor Details
-
FlushSnapshotSubprocedure
public FlushSnapshotSubprocedure(ProcedureMember member, ForeignExceptionDispatcher errorListener, long wakeFrequency, long timeout, List<HRegion> regions, org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription snapshot, RegionServerSnapshotManager.SnapshotSubprocedurePool taskManager)
-
-
Method Details
-
flushSnapshot
- Throws:
ForeignException
-
acquireBarrier
do nothing, core of snapshot is executed ininsideBarrier()
step.- Specified by:
acquireBarrier
in classSubprocedure
- Throws:
ForeignException
-
insideBarrier
do a flush snapshot of every region on this rs from the target table.- Specified by:
insideBarrier
in classSubprocedure
- Returns:
- the data the subprocedure wants to return to coordinator side.
- Throws:
ForeignException
-
cleanup
Cancel threads if they haven't finished.- Specified by:
cleanup
in classSubprocedure
-
releaseBarrier
Hooray!
-