org.apache.hadoop.hbase.regionserver.snapshot
Class FlushSnapshotSubprocedure

java.lang.Object
  extended by org.apache.hadoop.hbase.procedure.Subprocedure
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
Subprocedure.SubprocedureImpl
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
executionTimeoutTimer, monitor, rpcs, wakeFrequency
 
Constructor Summary
FlushSnapshotSubprocedure(ProcedureMember member, ForeignExceptionDispatcher errorListener, long wakeFrequency, long timeout, List<HRegion> regions, HBaseProtos.SnapshotDescription snapshot, org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager.SnapshotSubprocedurePool taskManager)
           
 
Method Summary
 void acquireBarrier()
          do nothing, core of snapshot is executed in insideBarrier() step.
 void cleanup(Exception e)
          Cancel threads if they haven't finished.
 void insideBarrier()
          do a flush snapshot of every region on this rs from the target table.
 void releaseBarrier()
          Hooray!
 
Methods inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
call, cancel, getMemberName, getName, receiveReachedGlobalBarrier, waitForLocallyCompleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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.