Class FlinkStateInternals<K>
java.lang.Object
org.apache.beam.runners.flink.translation.wrappers.streaming.state.FlinkStateInternals<K>
- All Implemented Interfaces:
org.apache.beam.runners.core.StateInternals
public class FlinkStateInternals<K>
extends Object
implements org.apache.beam.runners.core.StateInternals
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEagerly create user state to work around https://jira.apache.org/jira/browse/FLINK-12653.static class -
Constructor Summary
ConstructorsConstructorDescriptionFlinkStateInternals(org.apache.flink.runtime.state.KeyedStateBackend<FlinkKey> flinkStateBackend, Coder<K> keyCoder, Coder<? extends BoundedWindow> windowCoder, org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWatermarkHoldUsage(Instant watermarkHold) voidAllows to clear all state for the global watermark when the maximum watermark arrives.getKey()Returns the minimum over all watermark holds.voidremoveWatermarkHoldUsage(Instant watermarkHold) <T extends State>
Tstate(org.apache.beam.runners.core.StateNamespace namespace, org.apache.beam.runners.core.StateTag<T> address, StateContext<?> context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.beam.runners.core.StateInternals
state
-
Constructor Details
-
FlinkStateInternals
public FlinkStateInternals(org.apache.flink.runtime.state.KeyedStateBackend<FlinkKey> flinkStateBackend, Coder<K> keyCoder, Coder<? extends BoundedWindow> windowCoder, org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions) throws Exception - Throws:
Exception
-
-
Method Details
-
minWatermarkHoldMs
Returns the minimum over all watermark holds. -
getKey
- Specified by:
getKeyin interfaceorg.apache.beam.runners.core.StateInternals
-
state
public <T extends State> T state(org.apache.beam.runners.core.StateNamespace namespace, org.apache.beam.runners.core.StateTag<T> address, StateContext<?> context) - Specified by:
statein interfaceorg.apache.beam.runners.core.StateInternals
-
clearGlobalState
public void clearGlobalState()Allows to clear all state for the global watermark when the maximum watermark arrives. We do not clean up the global window state via timers which would lead to an unbounded number of keys and cleanup timers. Instead, the cleanup code below should be run when we finally receive the max watermark. -
addWatermarkHoldUsage
-
removeWatermarkHoldUsage
-