public class FlinkStateInternals<K>
extends java.lang.Object
implements org.apache.beam.runners.core.StateInternals
StateInternals that uses a Flink KeyedStateBackend to manage state.
Note: In the Flink streaming runner the key is always encoded using an Coder and
stored in a ByteBuffer.
| Constructor and Description |
|---|
FlinkStateInternals(org.apache.flink.runtime.state.KeyedStateBackend<java.nio.ByteBuffer> flinkStateBackend,
org.apache.beam.sdk.coders.Coder<K> keyCoder) |
| Modifier and Type | Method and Description |
|---|---|
K |
getKey() |
<T extends org.apache.beam.sdk.state.State> |
state(org.apache.beam.runners.core.StateNamespace namespace,
org.apache.beam.runners.core.StateTag<T> address,
org.apache.beam.sdk.state.StateContext<?> context) |
org.joda.time.Instant |
watermarkHold()
Returns the minimum over all watermark holds.
|
public FlinkStateInternals(org.apache.flink.runtime.state.KeyedStateBackend<java.nio.ByteBuffer> flinkStateBackend,
org.apache.beam.sdk.coders.Coder<K> keyCoder)
throws java.lang.Exception
java.lang.Exceptionpublic org.joda.time.Instant watermarkHold()
public K getKey()
getKey in interface org.apache.beam.runners.core.StateInternalspublic <T extends org.apache.beam.sdk.state.State> T state(org.apache.beam.runners.core.StateNamespace namespace,
org.apache.beam.runners.core.StateTag<T> address,
org.apache.beam.sdk.state.StateContext<?> context)
state in interface org.apache.beam.runners.core.StateInternals