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, setNextState
acquireLock, addStackIndex, beforeReplay, childrenCountDown, compareTo, completionCleanup, convert, convert, createProcedureInfo, doExecute, doRollback, elapsedTime, getException, getLastUpdate, 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, setOwner, setParentProcId, setProcId, setResult, setStackIndexes, setStartTime, setState, setTimeout, setTimeoutFailure, toString, toStringClass, toStringClassDetails, updateTimestamp, validateClass, wasExecuted
protected StateMachineProcedure.Flow executeFromState(Void env, org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State state)
StateMachineProcedure
executeFromState
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)
StateMachineProcedure
rollbackState
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)
StateMachineProcedure
getState
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)
StateMachineProcedure
getStateId
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()
StateMachineProcedure
getInitialState
in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>
protected boolean abort(Void env)
Procedure
protected void serializeStateData(OutputStream stream) throws IOException
Procedure
serializeStateData
in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>
stream
- the stream that will contain the user serialized dataIOException
protected void deserializeStateData(InputStream stream) throws IOException
Procedure
deserializeStateData
in class StateMachineProcedure<Void,org.apache.hadoop.hbase.procedure2.TestProcedureRecovery.TestStateMachineProcedure.State>
stream
- the stream that contains the user serialized dataIOException