Class ProcessJoinFunction<IN1,​IN2,​OUT>

  • Type Parameters:
    IN1 - Type of the first input
    IN2 - Type of the second input
    OUT - Type of the output
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction

    @PublicEvolving
    public abstract class ProcessJoinFunction<IN1,​IN2,​OUT>
    extends org.apache.flink.api.common.functions.AbstractRichFunction
    A function that processes two joined elements and produces a single output one.

    This function will get called for every joined pair of elements the joined two streams. The timestamp of the joined pair as well as the timestamp of the left element and the right element can be accessed through the ProcessJoinFunction.Context.

    See Also:
    Serialized Form
    • Constructor Detail

      • ProcessJoinFunction

        public ProcessJoinFunction()
    • Method Detail

      • processElement

        public abstract void processElement​(IN1 left,
                                            IN2 right,
                                            ProcessJoinFunction.Context ctx,
                                            org.apache.flink.util.Collector<OUT> out)
                                     throws Exception
        This method is called for each joined pair of elements. It can output zero or more elements through the provided Collector and has access to the timestamps of the joined elements and the result through the ProcessJoinFunction.Context.
        Parameters:
        left - The left element of the joined pair.
        right - The right element of the joined pair.
        ctx - A context that allows querying the timestamps of the left, right and joined pair. In addition, this context allows to emit elements on a side output.
        out - The collector to emit resulting elements to.
        Throws:
        Exception - This function may throw exceptions which cause the streaming program to fail and go in recovery mode.