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.Context
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
ProcessJoinFunction.Context
The context that is available during an invocation of#processElement(Object, Object, Context, Collector)
.
-
Constructor Summary
Constructors Constructor Description ProcessJoinFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
processElement(IN1 left, IN2 right, ProcessJoinFunction.Context ctx, org.apache.flink.util.Collector<OUT> out)
This method is called for each joined pair of elements.
-
-
-
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 providedCollector
and has access to the timestamps of the joined elements and the result through theProcessJoinFunction.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.
-
-