Class RichCoGroupFunction<IN1,IN2,OUT>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.RichCoGroupFunction<IN1,IN2,OUT>
-
- Type Parameters:
IN1- The type of the elements in the first input.IN2- The type of the elements in the second input.OUT- The type of the result elements.
- All Implemented Interfaces:
Serializable,CoGroupFunction<IN1,IN2,OUT>,Function,RichFunction
@Public public abstract class RichCoGroupFunction<IN1,IN2,OUT> extends AbstractRichFunction implements CoGroupFunction<IN1,IN2,OUT>
Rich variant of theCoGroupFunction. As aRichFunction, it gives access to theRuntimeContextand provides setup and teardown methods:RichFunction.open(org.apache.flink.configuration.Configuration)andRichFunction.close().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RichCoGroupFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidcoGroup(Iterable<IN1> first, Iterable<IN2> second, Collector<OUT> out)This method must be implemented to provide a user implementation of a coGroup.-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
-
-
-
-
Method Detail
-
coGroup
public abstract void coGroup(Iterable<IN1> first, Iterable<IN2> second, Collector<OUT> out) throws Exception
Description copied from interface:CoGroupFunctionThis method must be implemented to provide a user implementation of a coGroup. It is called for each pair of element groups where the elements share the same key.- Specified by:
coGroupin interfaceCoGroupFunction<IN1,IN2,OUT>- Parameters:
first- The records from the first input.second- The records from the second.out- A collector to return elements.- Throws:
Exception- The function may throw Exceptions, which will cause the program to cancel, and may trigger the recovery logic.
-
-