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
Nested ClassesModifier and TypeClassDescriptionstatic classCallable for adding files to snapshot manifest working dir.Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
Subprocedure.SubprocedureImpl -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger(package private) static final intprivate final org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescriptionprivate booleanprivate final RegionServerSnapshotManager.SnapshotSubprocedurePoolFields inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
executionTimeoutTimer, monitor, rpcs, wakeFrequency -
Constructor Summary
ConstructorsConstructorDescriptionFlushSnapshotSubprocedure(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 TypeMethodDescriptionvoiddo nothing, core of snapshot is executed ininsideBarrier()step.voidCancel threads if they haven't finished.private voidbyte[]do a flush snapshot of every region on this rs from the target table.voidHooray!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:
acquireBarrierin classSubprocedure- Throws:
ForeignException
-
insideBarrier
do a flush snapshot of every region on this rs from the target table.- Specified by:
insideBarrierin classSubprocedure- Returns:
- the data the subprocedure wants to return to coordinator side.
- Throws:
ForeignException
-
cleanup
Cancel threads if they haven't finished.- Specified by:
cleanupin classSubprocedure
-
releaseBarrier
Hooray!
-