Class BroadcastStateInputFormat<K,V>

java.lang.Object
org.apache.flink.api.common.io.RichInputFormat<OT,OperatorStateInputSplit>
org.apache.flink.state.api.input.BroadcastStateInputFormat<K,V>
Type Parameters:
K - The type of the keys in the BroadcastState.
V - The type of the values in the BroadcastState.
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.io.InputFormat<org.apache.flink.api.java.tuple.Tuple2<K,V>,OperatorStateInputSplit>, org.apache.flink.core.io.InputSplitSource<OperatorStateInputSplit>

@Internal public class BroadcastStateInputFormat<K,V> extends org.apache.flink.api.common.io.RichInputFormat<OT,OperatorStateInputSplit>
The input format for reading BroadcastState.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    BroadcastStateInputFormat(org.apache.flink.runtime.checkpoint.OperatorState operatorState, org.apache.flink.configuration.Configuration configuration, org.apache.flink.runtime.state.StateBackend backend, org.apache.flink.api.common.state.MapStateDescriptor<K,V> descriptor, org.apache.flink.api.common.ExecutionConfig executionConfig)
    Creates an input format for reading broadcast state from an operator in a savepoint.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    configure(org.apache.flink.configuration.Configuration parameters)
     
    createInputSplits(int minNumSplits)
     
    protected final Iterable<org.apache.flink.api.java.tuple.Tuple2<K,V>>
    getElements(org.apache.flink.runtime.state.OperatorStateBackend restoredBackend)
     
    org.apache.flink.core.io.InputSplitAssigner
     
    org.apache.flink.api.common.io.statistics.BaseStatistics
    getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics)
     
    org.apache.flink.api.java.tuple.Tuple2<K,V>
    nextRecord(org.apache.flink.api.java.tuple.Tuple2<K,V> reuse)
     
    void
     
    boolean
     

    Methods inherited from class org.apache.flink.api.common.io.RichInputFormat

    closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BroadcastStateInputFormat

      public BroadcastStateInputFormat(org.apache.flink.runtime.checkpoint.OperatorState operatorState, org.apache.flink.configuration.Configuration configuration, @Nullable org.apache.flink.runtime.state.StateBackend backend, org.apache.flink.api.common.state.MapStateDescriptor<K,V> descriptor, org.apache.flink.api.common.ExecutionConfig executionConfig) throws IOException
      Creates an input format for reading broadcast state from an operator in a savepoint.
      Parameters:
      operatorState - The state to be queried.
      configuration - The cluster configuration for restoring the backend.
      backend - The state backend used to restore the state.
      descriptor - The descriptor for this state, providing a name and serializer.
      Throws:
      IOException
  • Method Details

    • getElements

      protected final Iterable<org.apache.flink.api.java.tuple.Tuple2<K,V>> getElements(org.apache.flink.runtime.state.OperatorStateBackend restoredBackend) throws Exception
      Throws:
      Exception
    • configure

      public void configure(org.apache.flink.configuration.Configuration parameters)
    • getStatistics

      public org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics)
    • getInputSplitAssigner

      public org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner(OperatorStateInputSplit[] inputSplits)
    • createInputSplits

      public OperatorStateInputSplit[] createInputSplits(int minNumSplits)
    • open

      public void open(OperatorStateInputSplit split) throws IOException
      Throws:
      IOException
    • close

      public void close()
    • reachedEnd

      public boolean reachedEnd()
    • nextRecord

      public org.apache.flink.api.java.tuple.Tuple2<K,V> nextRecord(org.apache.flink.api.java.tuple.Tuple2<K,V> reuse)