Class FlinkBroadcastStateInternals<K>

java.lang.Object
org.apache.beam.runners.flink.translation.wrappers.streaming.state.FlinkBroadcastStateInternals<K>
All Implemented Interfaces:
org.apache.beam.runners.core.StateInternals

public class FlinkBroadcastStateInternals<K> extends 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 Summary

    Constructors
    Constructor
    Description
    FlinkBroadcastStateInternals(int indexInSubtaskGroup, org.apache.flink.runtime.state.OperatorStateBackend stateBackend, org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    <T extends State>
    T
    state(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

    • FlinkBroadcastStateInternals

      public FlinkBroadcastStateInternals(int indexInSubtaskGroup, org.apache.flink.runtime.state.OperatorStateBackend stateBackend, org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions)
  • Method Details

    • getKey

      public @Nullable K getKey()
      Specified by:
      getKey in interface org.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 interface org.apache.beam.runners.core.StateInternals