Package org.apache.flink.state.api.input
Class UnionStateInputFormat<OT>
java.lang.Object
org.apache.flink.api.common.io.RichInputFormat<OT,OperatorStateInputSplit>
org.apache.flink.state.api.input.UnionStateInputFormat<OT>
- Type Parameters:
OT- The generic type of the state
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.io.InputFormat<OT,,OperatorStateInputSplit> org.apache.flink.core.io.InputSplitSource<OperatorStateInputSplit>
@Internal
public class UnionStateInputFormat<OT>
extends org.apache.flink.api.common.io.RichInputFormat<OT,OperatorStateInputSplit>
Input format for reading operator union state.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnionStateInputFormat(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.ListStateDescriptor<OT> descriptor, org.apache.flink.api.common.ExecutionConfig executionConfig) Creates an input format for reading union 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(OT reuse) voidopen(OperatorStateInputSplit split) booleanMethods inherited from class org.apache.flink.api.common.io.RichInputFormat
closeInputFormat, getRuntimeContext, openInputFormat, setRuntimeContext
-
Constructor Details
-
UnionStateInputFormat
public UnionStateInputFormat(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.ListStateDescriptor<OT> descriptor, org.apache.flink.api.common.ExecutionConfig executionConfig) throws IOException Creates an input format for reading union 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<OT> 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
-