Class RootProcedureState<TEnvironment>
java.lang.Object
org.apache.hadoop.hbase.procedure2.RootProcedureState<TEnvironment>
Internal state of the ProcedureExecutor that describes the state of a "Root Procedure". A "Root
Procedure" is a Procedure without parent, each subprocedure will be added to the "Root Procedure"
stack (or rollback-stack). RootProcedureState is used and managed only by the ProcedureExecutor.
Long rootProcId = getRootProcedureId(proc); rollbackStack.get(rootProcId).acquire(proc) rollbackStack.get(rootProcId).release(proc) ...
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate booleanprivate intprivate RootProcedureState.Stateprivate Set<Procedure<TEnvironment>>private ArrayList<Procedure<TEnvironment>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidabort()protected booleanacquire(Procedure<TEnvironment> proc) Called by the ProcedureExecutor to mark the procedure step as running.protected booleanaddRollbackStep(Procedure<TEnvironment> proc) Called by the ProcedureExecutor after the procedure step is completed, to add the step to the rollback list (or procedure stack).protected voidaddSubProcedure(Procedure<TEnvironment> proc) protected RemoteProcedureExceptionprotected long[]protected List<Procedure<TEnvironment>>protected Collection<Procedure<TEnvironment>>protected booleanisFailed()protected booleanprotected booleanprotected booleanisValid()Called on store load by the ProcedureExecutor to validate the procedure stack.protected voidloadStack(Procedure<TEnvironment> proc) Called on store load by the ProcedureExecutor to load part of the stack.protected voidrelease(Procedure<TEnvironment> proc) Called by the ProcedureExecutor to mark the procedure step as finished.protected booleanCalled by the ProcedureExecutor to mark rollback executionprotected voidsetRollbackSupported(boolean rollbackSupported) protected voidCalled by the ProcedureExecutor to mark rollback execution
-
Field Details
-
LOG
-
subprocs
-
subprocStack
-
state
-
running
-
rollbackSupported
-
-
Constructor Details
-
RootProcedureState
-
-
Method Details
-
isFailed
-
isRollingback
-
setRollback
Called by the ProcedureExecutor to mark rollback execution -
unsetRollback
Called by the ProcedureExecutor to mark rollback execution -
setRollbackSupported
-
isRollbackSupported
-
getSubprocedureIds
-
getSubprocs
-
getSubproceduresStack
-
getException
-
acquire
Called by the ProcedureExecutor to mark the procedure step as running. -
release
Called by the ProcedureExecutor to mark the procedure step as finished. -
abort
-
addRollbackStep
Called by the ProcedureExecutor after the procedure step is completed, to add the step to the rollback list (or procedure stack).Return whether we successfully added the rollback step. If the root procedure has already crossed the PONR, we do not need to maintain the rollback step,
-
addSubProcedure
-
loadStack
Called on store load by the ProcedureExecutor to load part of the stack. Each procedure has its own stack-positions. Which means we have to write to the store only the Procedure we executed, and nothing else. on load we recreate the full stack by aggregating each procedure stack-positions. -
isValid
Called on store load by the ProcedureExecutor to validate the procedure stack.
-