Interface DataGenerator<T>
- All Superinterfaces:
Iterator<T>,Serializable
- All Known Implementing Classes:
RandomGenerator,SequenceGenerator
Stateful and re-scalable data generator.
-
Method Summary
Modifier and TypeMethodDescriptionvoidopen(String name, org.apache.flink.runtime.state.FunctionInitializationContext context, org.apache.flink.api.common.functions.RuntimeContext runtimeContext) Open and initialize state forDataGenerator.default voidsnapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) Snapshot state forDataGenerator.Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
open
void open(String name, org.apache.flink.runtime.state.FunctionInitializationContext context, org.apache.flink.api.common.functions.RuntimeContext runtimeContext) throws Exception Open and initialize state forDataGenerator. SeeCheckpointedFunction.initializeState(org.apache.flink.runtime.state.FunctionInitializationContext).- Parameters:
name- The state ofDataGeneratorshould related to this name, make sure the name of state is different.- Throws:
Exception
-
snapshotState
default void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) throws Exception Snapshot state forDataGenerator. SeeCheckpointedFunction.snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext).- Throws:
Exception
-