@Experimental public interface DataGenerator<T> extends Serializable, Iterator<T>
Modifier and Type | Method and Description |
---|---|
void |
open(String name,
FunctionInitializationContext context,
RuntimeContext runtimeContext)
Open and initialize state for
DataGenerator . |
default void |
snapshotState(FunctionSnapshotContext context)
Snapshot state for
DataGenerator . |
forEachRemaining, hasNext, next, remove
void open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext) throws Exception
DataGenerator
. See CheckpointedFunction.initializeState(org.apache.flink.runtime.state.FunctionInitializationContext)
.name
- The state of DataGenerator
should related to this name, make sure the
name of state is different.Exception
default void snapshotState(FunctionSnapshotContext context) throws Exception
DataGenerator
. See CheckpointedFunction.snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext)
.Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.