Package org.apache.flink.state.api.input
Class KeyedStateInputFormat<K,N,OUT>
java.lang.Object
org.apache.flink.api.common.io.RichInputFormat<OUT,KeyGroupRangeInputSplit>
org.apache.flink.state.api.input.KeyedStateInputFormat<K,N,OUT>
- Type Parameters:
K- The type of the key.OUT- The type of the output of theKeyedStateReaderFunction.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.io.InputFormat<OUT,,KeyGroupRangeInputSplit> org.apache.flink.core.io.InputSplitSource<KeyGroupRangeInputSplit>
@Internal
public class KeyedStateInputFormat<K,N,OUT>
extends org.apache.flink.api.common.io.RichInputFormat<OUT,KeyGroupRangeInputSplit>
Input format for reading partitioned state.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionKeyedStateInputFormat(org.apache.flink.runtime.checkpoint.OperatorState operatorState, org.apache.flink.runtime.state.StateBackend stateBackend, org.apache.flink.configuration.Configuration configuration, StateReaderOperator<?, K, N, OUT> operator, org.apache.flink.api.common.ExecutionConfig executionConfig) Creates an input format for reading partitioned state from an operator in a savepoint. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconfigure(org.apache.flink.configuration.Configuration parameters) createInputSplits(int minNumSplits) org.apache.flink.core.io.InputSplitAssignergetInputSplitAssigner(KeyGroupRangeInputSplit[] inputSplits) org.apache.flink.api.common.io.statistics.BaseStatisticsgetStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics) nextRecord(OUT reuse) voidopen(KeyGroupRangeInputSplit split) voidbooleanMethods inherited from class org.apache.flink.api.common.io.RichInputFormat
closeInputFormat, getRuntimeContext, setRuntimeContext
-
Constructor Details
-
KeyedStateInputFormat
public KeyedStateInputFormat(org.apache.flink.runtime.checkpoint.OperatorState operatorState, @Nullable org.apache.flink.runtime.state.StateBackend stateBackend, org.apache.flink.configuration.Configuration configuration, StateReaderOperator<?, K, throws IOExceptionN, OUT> operator, org.apache.flink.api.common.ExecutionConfig executionConfig) Creates an input format for reading partitioned state from an operator in a savepoint.- Parameters:
operatorState- The state to be queried.stateBackend- The state backed used to snapshot the operator.configuration- The underlying Flink configuration used to configure the state backend.- Throws:
IOException
-
-
Method Details
-
configure
public void configure(org.apache.flink.configuration.Configuration parameters) -
getInputSplitAssigner
public org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner(KeyGroupRangeInputSplit[] inputSplits) -
getStatistics
public org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics) -
createInputSplits
- Throws:
IOException
-
openInputFormat
public void openInputFormat()- Overrides:
openInputFormatin classorg.apache.flink.api.common.io.RichInputFormat<OUT,KeyGroupRangeInputSplit>
-
open
- Throws:
IOException
-
close
- Throws:
IOException
-
reachedEnd
public boolean reachedEnd() -
nextRecord
- Throws:
IOException
-