public static class TestProcedureRecovery.TestStateMachineProcedure extends StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>
StateMachineProcedure.Flow| Constructor and Description |
|---|
TestStateMachineProcedure() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
abort(Void env)
The abort() call is asynchronous and each procedure must decide how to deal
with that, if they want to be abortable.
|
protected void |
deserializeStateData(InputStream stream)
Called on store load to allow the user to decode the previously serialized
state.
|
protected StateMachineProcedure.Flow |
executeFromState(Void env,
org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
called to perform a single step of the specified 'state' of the procedure
|
protected org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State |
getInitialState()
Return the initial state object that will be used for the first call to executeFromState().
|
protected org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State |
getState(int stateId)
Convert an ordinal (or state id) to an Enum (or more descriptive) state object.
|
protected int |
getStateId(org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
Convert the Enum (or more descriptive) state object to an ordinal (or state id).
|
protected void |
rollbackState(Void env,
org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
called to perform the rollback of the specified state
|
protected void |
serializeStateData(OutputStream stream)
The user-level code of the procedure may have some state to
persist (e.g.
|
execute, rollback, setNextStateacquireLock, addStackIndex, beforeReplay, childrenCountDown, compareTo, completionCleanup, convert, convert, createProcedureInfo, doExecute, doRollback, elapsedTime, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcId, getResult, getRootProcedureId, getStackIndexes, getStartTime, getState, getTimeout, getTimeRemaining, hasException, hasOwner, hasParent, hasTimeout, incChildrenLatch, isFailed, isFinished, isSuccess, isWaiting, newInstance, releaseLock, removeStackIndex, setAbortFailure, setChildrenLatch, setFailure, setFailure, setNonceKey, setOwner, setParentProcId, setProcId, setResult, setStackIndexes, setStartTime, setState, setTimeout, setTimeoutFailure, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, updateTimestamp, validateClass, wasExecutedprotected StateMachineProcedure.Flow executeFromState(Void env, org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
StateMachineProcedureexecuteFromState in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>state - state to executeprotected void rollbackState(Void env, org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
StateMachineProcedurerollbackState in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>state - state to rollbackprotected org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State getState(int stateId)
StateMachineProceduregetState in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>stateId - the ordinal() of the state enum (or state id)protected int getStateId(org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
StateMachineProceduregetStateId in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>state - the state enum objectprotected org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State getInitialState()
StateMachineProceduregetInitialState in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>protected boolean abort(Void env)
Procedureprotected void serializeStateData(OutputStream stream) throws IOException
ProcedureserializeStateData in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>stream - the stream that will contain the user serialized dataIOException - failure to stream dataprotected void deserializeStateData(InputStream stream) throws IOException
ProceduredeserializeStateData in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>stream - the stream that contains the user serialized dataIOException