Package org.apache.flink.state.changelog
Class ChangelogStateFactory
java.lang.Object
org.apache.flink.state.changelog.ChangelogStateFactory
Maintains the lifecycle of all
ChangelogStates.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(String stateName, org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> internalPriorityQueue, StateChangeLogger<T, Void> logger, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer) <K,N, V, S extends org.apache.flink.api.common.state.State>
ChangelogStatecreate(org.apache.flink.api.common.state.StateDescriptor<S, V> stateDescriptor, org.apache.flink.runtime.state.internal.InternalKvState<K, N, V> internalKvState, KvStateChangeLogger<V, N> kvStateChangeLogger, org.apache.flink.runtime.state.InternalKeyContext<K> keyContext) voiddispose()getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) void
-
Constructor Details
-
ChangelogStateFactory
public ChangelogStateFactory()
-
-
Method Details
-
create
public <K,N, ChangelogState createV, S extends org.apache.flink.api.common.state.State> (org.apache.flink.api.common.state.StateDescriptor<S, V> stateDescriptor, org.apache.flink.runtime.state.internal.InternalKvState<K, throws ExceptionN, V> internalKvState, KvStateChangeLogger<V, N> kvStateChangeLogger, org.apache.flink.runtime.state.InternalKeyContext<K> keyContext) - Throws:
Exception
-
create
public <T> ChangelogKeyGroupedPriorityQueue<T> create(String stateName, org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> internalPriorityQueue, StateChangeLogger<T, Void> logger, org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer) -
getExistingState
public ChangelogState getExistingState(String name, org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot.BackendStateType type) throws UnsupportedOperationException - Parameters:
name- state nametype- state type (the only supported type currently are:key value,priority queue)- Returns:
- an existing state, i.e. the one that was already created. The returned state will not apply TTL to the passed values, regardless of the TTL settings. This prevents double applying of TTL (recovered values are TTL values if TTL was enabled). The state will, however, use TTL serializer if TTL is enabled. WARN: only valid during the recovery.
- Throws:
UnsupportedOperationException- if state type is not supported
-
resetAllWritingMetaFlags
public void resetAllWritingMetaFlags() -
dispose
public void dispose()
-