Interface DataGenerator<T>
-
- All Superinterfaces:
Iterator<T>
,Serializable
- All Known Implementing Classes:
DataGeneratorMapper
,DecimalDataRandomGenerator
,RandomGenerator
,RowDataGenerator
,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 void
open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext)
Open and initialize state forDataGenerator
.default void
snapshotState(FunctionSnapshotContext context)
Snapshot state forDataGenerator
.-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
-
-
-
Method Detail
-
open
void open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext) throws Exception
Open and initialize state forDataGenerator
. SeeCheckpointedFunction.initializeState(org.apache.flink.runtime.state.FunctionInitializationContext)
.- Parameters:
name
- The state ofDataGenerator
should related to this name, make sure the name of state is different.- Throws:
Exception
-
snapshotState
default void snapshotState(FunctionSnapshotContext context) throws Exception
Snapshot state forDataGenerator
. SeeCheckpointedFunction.snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext)
.- Throws:
Exception
-
-