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.@Public public abstract class RichCoGroupFunction<IN1,IN2,OUT> extends AbstractRichFunction implements CoGroupFunction<IN1,IN2,OUT>
CoGroupFunction
. As a RichFunction
, it gives access to the
RuntimeContext
and provides setup and teardown
methods: RichFunction.open(OpenContext)
and RichFunction.close()
.Constructor and Description |
---|
RichCoGroupFunction() |
Modifier and Type | Method and Description |
---|---|
abstract void |
coGroup(Iterable<IN1> first,
Iterable<IN2> second,
Collector<OUT> out)
This method must be implemented to provide a user implementation of a coGroup.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open
public abstract void coGroup(Iterable<IN1> first, Iterable<IN2> second, Collector<OUT> out) throws Exception
CoGroupFunction
coGroup
in interface CoGroupFunction<IN1,IN2,OUT>
first
- The records from the first input.second
- The records from the second.out
- A collector to return elements.Exception
- The function may throw Exceptions, which will cause the program to cancel,
and may trigger the recovery logic.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.