Class DataGeneratorMapper<A,B>

java.lang.Object
org.apache.flink.connector.datagen.table.types.DataGeneratorMapper<A,B>
All Implemented Interfaces:
Serializable, Iterator<B>, org.apache.flink.streaming.api.functions.source.datagen.DataGenerator<B>

@Internal public class DataGeneratorMapper<A,B> extends Object implements org.apache.flink.streaming.api.functions.source.datagen.DataGenerator<B>
Utility for mapping the output of a DataGenerator.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataGeneratorMapper(org.apache.flink.streaming.api.functions.source.datagen.DataGenerator<A> generator, org.apache.flink.util.function.SerializableFunction<A,B> mapper, float nullRate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    void
    open(String name, org.apache.flink.runtime.state.FunctionInitializationContext context, org.apache.flink.api.common.functions.RuntimeContext runtimeContext)
     

    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 Details

    • DataGeneratorMapper

      public DataGeneratorMapper(org.apache.flink.streaming.api.functions.source.datagen.DataGenerator<A> generator, org.apache.flink.util.function.SerializableFunction<A,B> mapper, float nullRate)
  • Method Details

    • open

      public void open(String name, org.apache.flink.runtime.state.FunctionInitializationContext context, org.apache.flink.api.common.functions.RuntimeContext runtimeContext) throws Exception
      Specified by:
      open in interface org.apache.flink.streaming.api.functions.source.datagen.DataGenerator<A>
      Throws:
      Exception
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<A>
    • next

      public B next()
      Specified by:
      next in interface Iterator<A>