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
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private boolean
private int
private RootProcedureState.State
private Set<Procedure<TEnvironment>>
private ArrayList<Procedure<TEnvironment>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
abort()
protected boolean
acquire
(Procedure<TEnvironment> proc) Called by the ProcedureExecutor to mark the procedure step as running.protected boolean
addRollbackStep
(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 void
addSubProcedure
(Procedure<TEnvironment> proc) protected RemoteProcedureException
protected long[]
protected List<Procedure<TEnvironment>>
protected Collection<Procedure<TEnvironment>>
protected boolean
isFailed()
protected boolean
protected boolean
protected boolean
isValid()
Called on store load by the ProcedureExecutor to validate the procedure stack.protected void
loadStack
(Procedure<TEnvironment> proc) Called on store load by the ProcedureExecutor to load part of the stack.protected void
release
(Procedure<TEnvironment> proc) Called by the ProcedureExecutor to mark the procedure step as finished.protected boolean
Called by the ProcedureExecutor to mark rollback executionprotected void
setRollbackSupported
(boolean rollbackSupported) protected void
Called 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.
-