Class 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:
    Serialized Form
    • 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void configure​(org.apache.flink.configuration.Configuration parameters)  
      OperatorStateInputSplit[] createInputSplits​(int minNumSplits)  
      protected Iterable<org.apache.flink.api.java.tuple.Tuple2<K,​V>> getElements​(org.apache.flink.runtime.state.OperatorStateBackend restoredBackend)  
      org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner​(OperatorStateInputSplit[] inputSplits)  
      org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics​(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics)  
      OT nextRecord​(OT reuse)  
      void open​(OperatorStateInputSplit split)  
      boolean reachedEnd()  
      • Methods inherited from class org.apache.flink.api.common.io.RichInputFormat

        closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
    • Constructor Detail

      • 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 Detail

      • 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)
      • close

        public void close()
      • reachedEnd

        public boolean reachedEnd()
      • nextRecord

        public OT nextRecord​(OT reuse)