Package org.apache.flink.runtime.state
Class SharedStateRegistryImpl
java.lang.Object
org.apache.flink.runtime.state.SharedStateRegistryImpl
- All Implemented Interfaces:
AutoCloseable,SharedStateRegistry
SharedStateRegistry implementation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn object with empty discardState for registering. -
Field Summary
Fields inherited from interface org.apache.flink.runtime.state.SharedStateRegistry
DEFAULT_FACTORY -
Constructor Summary
ConstructorsConstructorDescriptionDefault uses direct executor to delete unreferenced stateSharedStateRegistryImpl(Executor asyncDisposalExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckpointCompleted(long checkpointId) voidclose()voidregisterAll(Iterable<? extends CompositeStateHandle> stateHandles, long checkpointID) Register given shared states in the registry.voidregisterAllAfterRestored(CompletedCheckpoint checkpoint, org.apache.flink.core.execution.RecoveryClaimMode mode) Set the lowest checkpoint ID below which no state is discarded, inclusive.registerReference(SharedStateRegistryKey registrationKey, StreamStateHandle newHandle, long checkpointID, boolean preventDiscardingCreatedCheckpoint) Register a reference to the given shared state in the registry.toString()unregisterUnusedState(long lowestCheckpointID) Unregister state that is not referenced by the given checkpoint ID or any newer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.state.SharedStateRegistry
registerReference
-
Constructor Details
-
SharedStateRegistryImpl
public SharedStateRegistryImpl()Default uses direct executor to delete unreferenced state -
SharedStateRegistryImpl
-
-
Method Details
-
unregisterUnusedState
Description copied from interface:SharedStateRegistryUnregister state that is not referenced by the given checkpoint ID or any newer.- Specified by:
unregisterUnusedStatein interfaceSharedStateRegistry- Parameters:
lowestCheckpointID- which is still valid.- Returns:
- a set of checkpointID which is still in use.
-
registerAll
Description copied from interface:SharedStateRegistryRegister given shared states in the registry.NOTE: For state from checkpoints from other jobs or runs (i.e. after recovery), please use
SharedStateRegistry.registerAllAfterRestored(CompletedCheckpoint, RecoveryClaimMode)- Specified by:
registerAllin interfaceSharedStateRegistry- Parameters:
stateHandles- The shared states to register.checkpointID- which uses the states.
-
registerAllAfterRestored
public void registerAllAfterRestored(CompletedCheckpoint checkpoint, org.apache.flink.core.execution.RecoveryClaimMode mode) Description copied from interface:SharedStateRegistrySet the lowest checkpoint ID below which no state is discarded, inclusive.After recovery from an incremental checkpoint, its state should NOT be discarded, even if
not usedanymore (unless recovering inCLAIMmode).This should hold for both cases: when recovering from that initial checkpoint; and from any subsequent checkpoint derived from it.
- Specified by:
registerAllAfterRestoredin interfaceSharedStateRegistry
-
checkpointCompleted
public void checkpointCompleted(long checkpointId) - Specified by:
checkpointCompletedin interfaceSharedStateRegistry
-
toString
-
close
public void close()- Specified by:
closein interfaceAutoCloseable