Class SequentialProcedure<TEnvironment>
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<TEnvironment>
org.apache.hadoop.hbase.procedure2.SequentialProcedure<TEnvironment>
- All Implemented Interfaces:
Comparable<Procedure<TEnvironment>>
@Private
@Evolving
public abstract class SequentialProcedure<TEnvironment>
extends Procedure<TEnvironment>
A SequentialProcedure describes one step in a procedure chain:
-> Step 1 -> Step 2 -> Step 3The main difference from a base Procedure is that the execute() of a SequentialProcedure will be called only once; there will be no second execute() call once the children are finished. which means once the child of a SequentialProcedure are completed the SequentialProcedure is completed too.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.Procedure
Procedure.LockState -
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.procedure2.Procedure
NO_PROC_ID, NO_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddeserializeStateData(ProcedureStateSerializer serializer) Called on store load to allow the user to decode the previously serialized state.protected Procedure[]doExecute(TEnvironment env) Internal method called by the ProcedureExecutor that starts the user-level code execute().protected voiddoRollback(TEnvironment env) Internal method called by the ProcedureExecutor that starts the user-level code rollback().protected voidserializeStateData(ProcedureStateSerializer serializer) The user-level code of the procedure may have some state to persist (e.g.Methods inherited from class org.apache.hadoop.hbase.procedure2.Procedure
abort, acquireLock, addStackIndex, afterExec, afterReplay, beforeExec, beforeReplay, bypass, compareTo, completionCleanup, doAcquireLock, doReleaseLock, elapsedTime, execute, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRollbackSupported, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, lockedWhenLoading, needPersistence, releaseLock, removeStackIndex, resetPersistence, restoreLock, rollback, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, tryRunnable, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
-
Field Details
-
executed
-
-
Constructor Details
-
SequentialProcedure
public SequentialProcedure()
-
-
Method Details
-
doExecute
protected Procedure[] doExecute(TEnvironment env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException Description copied from class:ProcedureInternal method called by the ProcedureExecutor that starts the user-level code execute().- Overrides:
doExecutein classProcedure<TEnvironment>- Throws:
ProcedureSuspendedException- This is used when procedure wants to halt processing and skip out without changing states or releasing any locks held.ProcedureYieldExceptionInterruptedException
-
doRollback
Description copied from class:ProcedureInternal method called by the ProcedureExecutor that starts the user-level code rollback().- Overrides:
doRollbackin classProcedure<TEnvironment>- Throws:
IOExceptionInterruptedException
-
serializeStateData
Description copied from class:ProcedureThe user-level code of the procedure may have some state to persist (e.g. input arguments or current position in the processing state) to be able to resume on failure.- Specified by:
serializeStateDatain classProcedure<TEnvironment>- Parameters:
serializer- stores the serializable state- Throws:
IOException
-
deserializeStateData
Description copied from class:ProcedureCalled on store load to allow the user to decode the previously serialized state.- Specified by:
deserializeStateDatain classProcedure<TEnvironment>- Parameters:
serializer- contains the serialized state- Throws:
IOException
-