Class CompletedProcedureCleaner<TEnvironment>
java.lang.Object
org.apache.hadoop.hbase.procedure2.Procedure<TEnvironment>
org.apache.hadoop.hbase.procedure2.ProcedureInMemoryChore<TEnvironment>
org.apache.hadoop.hbase.procedure2.CompletedProcedureCleaner<TEnvironment>
- All Implemented Interfaces:
- Comparable<Procedure<TEnvironment>>
Internal cleaner that removes the completed procedure results after a TTL.
 
 NOTE: This is a special case handled in timeoutLoop().
 
 Since the client code looks more or less like:
 
procId = master.doOperation() while (master.getProcResult(procId) == ProcInProgress);The master should not throw away the proc result as soon as the procedure is done but should wait a result request from the client (see executor.removeResult(procId)) The client will call something like master.isProcDone() or master.getProcResult() which will return the result/state to the client, and it will mark the completed proc as ready to delete. note that the client may not receive the response from the master (e.g. master failover) so, if we delay a bit the real deletion of the proc result the client will be able to get the result the next try.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.hadoop.hbase.procedure2.ProcedureProcedure.LockState
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final String(package private) static final Stringprivate final Map<Long,CompletedProcedureRetainer<TEnvironment>> private org.apache.hadoop.conf.Configurationprivate static final intprivate static final intprivate static final org.slf4j.Loggerprivate final IdLockprivate final ProcedureStoreFields inherited from class org.apache.hadoop.hbase.procedure2.ProcedureNO_PROC_ID, NO_TIMEOUT
- 
Constructor SummaryConstructorsConstructorDescriptionCompletedProcedureCleaner(org.apache.hadoop.conf.Configuration conf, ProcedureStore store, IdLock procExecutionLock, Map<Long, CompletedProcedureRetainer<TEnvironment>> completedMap, Map<NonceKey, Long> nonceKeysToProcIdsMap) 
- 
Method SummaryMethods inherited from class org.apache.hadoop.hbase.procedure2.ProcedureInMemoryChoreabort, deserializeStateData, execute, rollback, serializeStateDataMethods inherited from class org.apache.hadoop.hbase.procedure2.ProcedureacquireLock, addStackIndex, afterReplay, beforeReplay, bypass, compareTo, completionCleanup, doAcquireLock, doExecute, doReleaseLock, doRollback, elapsedTime, getChildrenLatch, getException, getLastUpdate, getNonceKey, getOwner, getParentProcId, getProcedureMetrics, getProcId, getProcIdHashCode, getProcName, getResult, getRootProcedureId, getRootProcId, getStackIndexes, getState, getSubmittedTime, getTimeout, getTimeoutTimestamp, hasChildren, hasException, hasLock, hasOwner, hasParent, hasTimeout, haveSameParent, holdLock, incChildrenLatch, isBypass, isFailed, isFinished, isInitializing, isLockedWhenLoading, isRollbackSupported, isRunnable, isSuccess, isWaiting, isYieldAfterExecutionStep, lockedWhenLoading, needPersistence, releaseLock, removeStackIndex, resetPersistence, restoreLock, setAbortFailure, setChildrenLatch, setExecuted, setFailure, setFailure, setLastUpdate, setNonceKey, setOwner, setOwner, setParentProcId, setProcId, setResult, setRootProcId, setStackIndexes, setState, setSubmittedTime, setTimeout, setTimeoutFailure, shouldWaitClientAck, skipPersistence, suspend, toString, toStringClass, toStringClassDetails, toStringDetails, toStringSimpleSB, toStringState, tryRunnable, updateMetricsOnFinish, updateMetricsOnSubmit, updateTimestamp, waitInitialized, wasExecuted
- 
Field Details- 
LOG
- 
CLEANER_INTERVAL_CONF_KEY- See Also:
 
- 
DEFAULT_CLEANER_INTERVAL- See Also:
 
- 
BATCH_SIZE_CONF_KEY- See Also:
 
- 
DEFAULT_BATCH_SIZE- See Also:
 
- 
completed
- 
nonceKeysToProcIdsMap
- 
store
- 
procExecutionLock
- 
conf
 
- 
- 
Constructor Details- 
CompletedProcedureCleanerpublic CompletedProcedureCleaner(org.apache.hadoop.conf.Configuration conf, ProcedureStore store, IdLock procExecutionLock, Map<Long, CompletedProcedureRetainer<TEnvironment>> completedMap, Map<NonceKey, Long> nonceKeysToProcIdsMap) 
 
- 
- 
Method Details- 
periodicExecute- Specified by:
- periodicExecutein class- ProcedureInMemoryChore<TEnvironment>
 
 
-