Class FlatMapIterator<IN,​OUT>

  • Type Parameters:
    IN - Type of the input elements.
    OUT - Type of the returned elements.
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.FlatMapFunction<IN,​OUT>, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction

    @Deprecated
    @PublicEvolving
    public abstract class FlatMapIterator<IN,​OUT>
    extends org.apache.flink.api.common.functions.RichFlatMapFunction<IN,​OUT>
    Deprecated.
    All Flink DataSet APIs are deprecated since Flink 1.18 and will be removed in a future Flink major version. You can still build your application in DataSet, but you should move to either the DataStream and/or Table API.
    A convenience variant of the RichFlatMapFunction that returns elements through an iterator, rather then through a collector. In all other respects, it behaves exactly like the FlatMapFunction.

    The function needs to be serializable, as defined in Serializable.

    See Also:
    FLIP-131: Consolidate the user-facing Dataflow SDKs/APIs (and deprecate the DataSet API, Serialized Form
    • Constructor Detail

      • FlatMapIterator

        public FlatMapIterator()
        Deprecated.
    • Method Detail

      • flatMap

        public abstract Iterator<OUT> flatMap​(IN value)
                                       throws Exception
        Deprecated.
        The core method of the function. Takes an element from the input data set and transforms it into zero, one, or more elements.
        Parameters:
        value - The input value.
        Returns:
        An iterator over the returned elements.
        Throws:
        Exception - This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
      • flatMap

        public final void flatMap​(IN value,
                                  org.apache.flink.util.Collector<OUT> out)
                           throws Exception
        Deprecated.
        Delegates calls to the flatMap(Object) method.
        Specified by:
        flatMap in interface org.apache.flink.api.common.functions.FlatMapFunction<IN,​OUT>
        Specified by:
        flatMap in class org.apache.flink.api.common.functions.RichFlatMapFunction<IN,​OUT>
        Throws:
        Exception