Class DataGeneratorMapper<A,B>
- java.lang.Object
-
- org.apache.flink.connector.datagen.table.types.DataGeneratorMapper<A,B>
-
- All Implemented Interfaces:
Serializable
,Iterator<B>
,DataGenerator<B>
@Internal public class DataGeneratorMapper<A,B> extends Object implements DataGenerator<B>
Utility for mapping the output of aDataGenerator
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataGeneratorMapper(DataGenerator<A> generator, SerializableFunction<A,B> mapper, float nullRate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
B
next()
void
open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext)
Open and initialize state forDataGenerator
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.streaming.api.functions.source.datagen.DataGenerator
snapshotState
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
-
-
-
Constructor Detail
-
DataGeneratorMapper
public DataGeneratorMapper(DataGenerator<A> generator, SerializableFunction<A,B> mapper, float nullRate)
-
-
Method Detail
-
open
public void open(String name, FunctionInitializationContext context, RuntimeContext runtimeContext) throws Exception
Description copied from interface:DataGenerator
Open and initialize state forDataGenerator
. SeeCheckpointedFunction.initializeState(org.apache.flink.runtime.state.FunctionInitializationContext)
.- Specified by:
open
in interfaceDataGenerator<A>
- Parameters:
name
- The state ofDataGenerator
should related to this name, make sure the name of state is different.- Throws:
Exception
-
-