public class FlinkBroadcastStateInternals<K>
extends java.lang.Object
implements org.apache.beam.runners.core.StateInternals
StateInternals that uses a Flink OperatorStateBackend to manage the broadcast
state. The state is the same on all parallel instances of the operator. So we just need store
state of operator-0 in OperatorStateBackend.
Note: Ignore index of key. Mainly for SideInputs.
| Constructor and Description |
|---|
FlinkBroadcastStateInternals(int indexInSubtaskGroup,
org.apache.flink.runtime.state.OperatorStateBackend stateBackend,
org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions) |
| 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) |
public FlinkBroadcastStateInternals(int indexInSubtaskGroup,
org.apache.flink.runtime.state.OperatorStateBackend stateBackend,
org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions)
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