Package org.apache.flink.state.api.input
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 theBroadcastState.V- The type of the values in theBroadcastState.
- 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
ConstructorsConstructorDescriptionBroadcastStateInputFormat(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 TypeMethodDescriptionvoidclose()voidconfigure(org.apache.flink.configuration.Configuration parameters) createInputSplits(int minNumSplits) getElements(org.apache.flink.runtime.state.OperatorStateBackend restoredBackend) org.apache.flink.core.io.InputSplitAssignergetInputSplitAssigner(OperatorStateInputSplit[] inputSplits) org.apache.flink.api.common.io.statistics.BaseStatisticsgetStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics) nextRecord(org.apache.flink.api.java.tuple.Tuple2<K, V> reuse) voidopen(OperatorStateInputSplit split) booleanMethods inherited from class org.apache.flink.api.common.io.RichInputFormat
closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
-
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 IOExceptionCreates 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
-
open
- Throws:
IOException
-
close
public void close() -
reachedEnd
public boolean reachedEnd() -
nextRecord
-