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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyedStateInputFormat(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidconfigure(org.apache.flink.configuration.Configuration parameters)KeyGroupRangeInputSplit[]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)OUTnextRecord(OUT reuse)voidopen(KeyGroupRangeInputSplit split)voidopenInputFormat()booleanreachedEnd()
-
-
-
Constructor Detail
-
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,N,OUT> operator, org.apache.flink.api.common.ExecutionConfig executionConfig) throws IOExceptionCreates 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 Detail
-
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
public KeyGroupRangeInputSplit[] createInputSplits(int minNumSplits) throws IOException
- Throws:
IOException
-
openInputFormat
public void openInputFormat()
- Overrides:
openInputFormatin classorg.apache.flink.api.common.io.RichInputFormat<OUT,KeyGroupRangeInputSplit>
-
open
public void open(KeyGroupRangeInputSplit split) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Throws:
IOException
-
reachedEnd
public boolean reachedEnd()
-
nextRecord
public OUT nextRecord(OUT reuse) throws IOException
- Throws:
IOException
-
-