Class ProcessJoinFunction<IN1,IN2,OUT>
java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.streaming.api.functions.co.ProcessJoinFunction<IN1,IN2,OUT>
- Type Parameters:
IN1- Type of the first inputIN2- Type of the second inputOUT- 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<IN1,.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe context that is available during an invocation of#processElement(Object, Object, Context, Collector). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidprocessElement(IN1 left, IN2 right, ProcessJoinFunction<IN1, IN2, OUT>.Context ctx, org.apache.flink.util.Collector<OUT> out) This method is called for each joined pair of elements.Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
Constructor Details
-
ProcessJoinFunction
public ProcessJoinFunction()
-
-
Method Details
-
processElement
public abstract void processElement(IN1 left, IN2 right, ProcessJoinFunction<IN1, IN2, throws ExceptionOUT>.Context ctx, org.apache.flink.util.Collector<OUT> out) This method is called for each joined pair of elements. It can output zero or more elements through the providedCollectorand has access to the timestamps of the joined elements and the result through theProcessJoinFunction<IN1,.IN2, OUT>.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.
-