Class 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:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • 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>