Class FlinkBroadcastStateInternals<K>

  • All Implemented Interfaces:
    org.apache.beam.runners.core.StateInternals

    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 Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @Nullable K getKey()  
      <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)  
      • 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 Detail

      • FlinkBroadcastStateInternals

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

      • getKey

        public @Nullable K getKey()
        Specified by:
        getKey in interface org.apache.beam.runners.core.StateInternals
      • state

        public <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)
        Specified by:
        state in interface org.apache.beam.runners.core.StateInternals