IN1
- Type of the first inputIN2
- Type of the second inputOUT
- Type of the output@PublicEvolving public abstract class ProcessJoinFunction<IN1,IN2,OUT> extends AbstractRichFunction
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
.
Modifier and Type | Class and Description |
---|---|
class |
ProcessJoinFunction.Context
The context that is available during an invocation of
processElement(Object, Object,
Context, Collector) . |
Constructor and Description |
---|
ProcessJoinFunction() |
Modifier and Type | Method and Description |
---|---|
abstract void |
processElement(IN1 left,
IN2 right,
ProcessJoinFunction.Context ctx,
Collector<OUT> out)
This method is called for each joined pair of elements.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public abstract void processElement(IN1 left, IN2 right, ProcessJoinFunction.Context ctx, Collector<OUT> out) throws Exception
Collector
and has access to the timestamps of the joined
elements and the result through the ProcessJoinFunction.Context
.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.Exception
- This function may throw exceptions which cause the streaming program to
fail and go in recovery mode.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.