org.apache.hadoop.hbase.regionserver.snapshot
Class FlushSnapshotSubprocedure
java.lang.Object
org.apache.hadoop.hbase.procedure.Subprocedure
org.apache.hadoop.hbase.regionserver.snapshot.FlushSnapshotSubprocedure
- All Implemented Interfaces:
- Callable<Void>
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class FlushSnapshotSubprocedure
- extends Subprocedure
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlushSnapshotSubprocedure
public FlushSnapshotSubprocedure(ProcedureMember member,
ForeignExceptionDispatcher errorListener,
long wakeFrequency,
long timeout,
List<HRegion> regions,
HBaseProtos.SnapshotDescription snapshot,
org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager.SnapshotSubprocedurePool taskManager)
acquireBarrier
public void acquireBarrier()
throws ForeignException
- do nothing, core of snapshot is executed in
insideBarrier()
step.
- Specified by:
acquireBarrier
in class Subprocedure
- Throws:
ForeignException
insideBarrier
public void insideBarrier()
throws ForeignException
- do a flush snapshot of every region on this rs from the target table.
- Specified by:
insideBarrier
in class Subprocedure
- Throws:
ForeignException
cleanup
public void cleanup(Exception e)
- Cancel threads if they haven't finished.
- Specified by:
cleanup
in class Subprocedure
releaseBarrier
public void releaseBarrier()
- Hooray!
Copyright © 2015 The Apache Software Foundation. All rights reserved.