Interface DataGenerator<T>
-
- All Superinterfaces:
Iterator<T>,Serializable
- All Known Implementing Classes:
RandomGenerator,SequenceGenerator
@Experimental public interface DataGenerator<T> extends Serializable, Iterator<T>
Stateful and re-scalable data generator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidopen(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 Detail
-
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 ExceptionSnapshot state forDataGenerator. SeeCheckpointedFunction.snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext).- Throws:
Exception
-
-