@InterfaceAudience.Private public class FailedProcedure<TEnvironment> extends Procedure<TEnvironment>
Procedure.LockState
Modifier and Type | Field and Description |
---|---|
private String |
procName |
NO_PROC_ID, NO_TIMEOUT
Constructor and Description |
---|
FailedProcedure() |
FailedProcedure(long procId,
String procName,
User owner,
NonceKey nonceKey,
IOException exception) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
abort(TEnvironment env)
The abort() call is asynchronous and each procedure must decide how to deal
with it, if they want to be abortable.
|
protected void |
deserializeStateData(ProcedureStateSerializer serializer)
Called on store load to allow the user to decode the previously serialized
state.
|
protected Procedure<TEnvironment>[] |
execute(TEnvironment env)
The main code of the procedure.
|
String |
getProcName() |
protected void |
rollback(TEnvironment env)
The code to undo what was done by the execute() code.
|
protected void |
serializeStateData(ProcedureStateSerializer serializer)
The user-level code of the procedure may have some state to
persist (e.g.
|
acquireLock, addStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doAcquireLock, doExecute, doReleaseLock, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, lockedWhenLoading, needPersistence, releaseLock, removeStackIndex, resetPersistence, restoreLock, setAbortFailure, setChildrenLatch, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, tryRunnable, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
public FailedProcedure()
public FailedProcedure(long procId, String procName, User owner, NonceKey nonceKey, IOException exception)
public String getProcName()
getProcName
in class Procedure<TEnvironment>
protected Procedure<TEnvironment>[] execute(TEnvironment env) throws ProcedureYieldException, ProcedureSuspendedException, InterruptedException
Procedure
execute
in class Procedure<TEnvironment>
env
- the environment passed to the ProcedureExecutorProcedureYieldException
- the procedure will be added back to the queue and retried later.ProcedureSuspendedException
- Signal to the executor that Procedure has suspended itself and
has set itself up waiting for an external event to wake it back up again.InterruptedException
- the procedure will be added back to the queue and retried later.protected void rollback(TEnvironment env) throws IOException, InterruptedException
Procedure
rollback
in class Procedure<TEnvironment>
env
- the environment passed to the ProcedureExecutorIOException
- temporary failure, the rollback will retry laterInterruptedException
- the procedure will be added back to the queue and retried laterprotected boolean abort(TEnvironment env)
Procedure
NOTE: abort() is not like Thread.interrupt(). It is just a notification that allows the procedure implementor abort.
abort
in class Procedure<TEnvironment>
protected void serializeStateData(ProcedureStateSerializer serializer) throws IOException
Procedure
serializeStateData
in class Procedure<TEnvironment>
serializer
- stores the serializable stateIOException
protected void deserializeStateData(ProcedureStateSerializer serializer) throws IOException
Procedure
deserializeStateData
in class Procedure<TEnvironment>
serializer
- contains the serialized stateIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.