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 class
Eagerly 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 TypeMethodDescriptionvoid
addWatermarkHoldUsage
(Instant watermarkHold) void
Allows to clear all state for the global watermark when the maximum watermark arrives.getKey()
Returns the minimum over all watermark holds.void
removeWatermarkHoldUsage
(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, wait
Methods 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:
getKey
in 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:
state
in 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
-