private static class ProcedureExecutor.CompletedProcedureCleaner<TEnvironment> extends Procedure<TEnvironment>
Modifier and Type | Field and Description |
---|---|
private static String |
CLEANER_INTERVAL_CONF_KEY |
private Map<Long,ProcedureInfo> |
completed |
private org.apache.hadoop.conf.Configuration |
conf |
private static int |
DEFAULT_ACKED_EVICT_TTL |
private static int |
DEFAULT_CLEANER_INTERVAL |
private static int |
DEFAULT_EVICT_TTL |
private static String |
EVICT_ACKED_TTL_CONF_KEY |
private static String |
EVICT_TTL_CONF_KEY |
private static org.apache.commons.logging.Log |
LOG |
private Map<NonceKey,Long> |
nonceKeysToProcIdsMap |
private ProcedureStore |
store |
Constructor and Description |
---|
ProcedureExecutor.CompletedProcedureCleaner(org.apache.hadoop.conf.Configuration conf,
ProcedureStore store,
Map<Long,ProcedureInfo> completedMap,
Map<NonceKey,Long> nonceKeysToProcIdsMap) |
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 that, if they want to be abortable.
|
void |
deserializeStateData(InputStream stream)
Called on store load to allow the user to decode the previously serialized
state.
|
protected Procedure[] |
execute(TEnvironment env)
The main code of the procedure.
|
void |
periodicExecute(TEnvironment env) |
protected void |
rollback(TEnvironment env)
The code to undo what done by the execute() code.
|
void |
serializeStateData(OutputStream stream)
The user-level code of the procedure may have some state to
persist (e.g.
|
acquireLock, addStackIndex, beforeReplay, childrenCountDown, compareTo, completionCleanup, convert, convert, createProcedureInfo, doExecute, doRollback, elapsedTime, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcId, getProcIdHashCode, getResult, getRootProcedureId, getStackIndexes, getStartTime, getState, getTimeout, getTimeRemaining, hasException, hasOwner, hasParent, hasTimeout, incChildrenLatch, isFailed, isFinished, isSuccess, isWaiting, isYieldAfterExecutionStep, newInstance, releaseLock, removeStackIndex, setAbortFailure, setChildrenLatch, setFailure, setFailure, setNonceKey, setOwner, setParentProcId, setProcId, setResult, setStackIndexes, setStartTime, setState, setTimeout, setTimeoutFailure, shouldWaitClientAck, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, updateTimestamp, validateClass, wasExecuted
private static final org.apache.commons.logging.Log LOG
private static final String CLEANER_INTERVAL_CONF_KEY
private static final int DEFAULT_CLEANER_INTERVAL
private static final String EVICT_TTL_CONF_KEY
private static final int DEFAULT_EVICT_TTL
private static final String EVICT_ACKED_TTL_CONF_KEY
private static final int DEFAULT_ACKED_EVICT_TTL
private final Map<Long,ProcedureInfo> completed
private final ProcedureStore store
private final org.apache.hadoop.conf.Configuration conf
public ProcedureExecutor.CompletedProcedureCleaner(org.apache.hadoop.conf.Configuration conf, ProcedureStore store, Map<Long,ProcedureInfo> completedMap, Map<NonceKey,Long> nonceKeysToProcIdsMap)
public void periodicExecute(TEnvironment env)
protected Procedure[] execute(TEnvironment env)
Procedure
execute
in class Procedure<TEnvironment>
env
- the environment passed to the ProcedureExecutorprotected void rollback(TEnvironment env)
Procedure
rollback
in class Procedure<TEnvironment>
env
- the environment passed to the ProcedureExecutorprotected boolean abort(TEnvironment env)
Procedure
abort
in class Procedure<TEnvironment>
public void serializeStateData(OutputStream stream)
Procedure
serializeStateData
in class Procedure<TEnvironment>
stream
- the stream that will contain the user serialized datapublic void deserializeStateData(InputStream stream)
Procedure
deserializeStateData
in class Procedure<TEnvironment>
stream
- the stream that contains the user serialized dataCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.