Class Subprocedure.SubprocedureImpl
java.lang.Object
org.apache.hadoop.hbase.procedure.Subprocedure
org.apache.hadoop.hbase.procedure.Subprocedure.SubprocedureImpl
- Enclosing class:
- Subprocedure
Empty Subprocedure for testing. Must be public for stubbing used in testing to work.
-
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
ConstructorDescriptionSubprocedureImpl
(ProcedureMember member, String opName, ForeignExceptionDispatcher monitor, long wakeFrequency, long timeout) -
Method Summary
Modifier and TypeMethodDescriptionvoid
The implementation of this method should gather and hold required resources (locks, disk space, etc) to satisfy the Procedures barrier condition.void
Users should override this method.byte[]
The implementation of this method should act with the assumption that the barrier condition has been satisfied.Methods inherited from class org.apache.hadoop.hbase.procedure.Subprocedure
call, cancel, getErrorCheckable, getMemberName, getName, isComplete, receiveReachedGlobalBarrier, waitForLocallyCompleted, waitForReachedGlobalBarrier
-
Constructor Details
-
SubprocedureImpl
public SubprocedureImpl(ProcedureMember member, String opName, ForeignExceptionDispatcher monitor, long wakeFrequency, long timeout)
-
-
Method Details
-
acquireBarrier
Description copied from class:Subprocedure
The implementation of this method should gather and hold required resources (locks, disk space, etc) to satisfy the Procedures barrier condition. For example, this would be where to make all the regions on a RS on the quiescent for an procedure that required all regions to be globally quiesed. Users should override this method. If a quiescent is not required, this is overkill but can still be used to execute a procedure on all members and to propagate any exceptions.- Specified by:
acquireBarrier
in classSubprocedure
- Throws:
ForeignException
-
insideBarrier
Description copied from class:Subprocedure
The implementation of this method should act with the assumption that the barrier condition has been satisfied. Continuing the previous example, a condition could be that all RS's globally have been quiesced, and procedures that require this precondition could be implemented here. The implementation should also collect the result of the subprocedure as data to be returned to the coordinator upon successful completion. Users should override this method.- Specified by:
insideBarrier
in classSubprocedure
- Returns:
- the data the subprocedure wants to return to coordinator side.
- Throws:
ForeignException
-
cleanup
Description copied from class:Subprocedure
Users should override this method. This implementation of this method should rollback and cleanup any temporary or partially completed state that theSubprocedure.acquireBarrier()
may have created.- Specified by:
cleanup
in classSubprocedure
-