T
- Type of the elements that this function processes.@Public public abstract class RichReduceFunction<T> extends AbstractRichFunction implements ReduceFunction<T>
ReduceFunction
. As a RichFunction
, it gives access to the
RuntimeContext
and provides setup and teardown methods:
RichFunction.open(org.apache.flink.configuration.Configuration)
and
RichFunction.close()
.Constructor and Description |
---|
RichReduceFunction() |
Modifier and Type | Method and Description |
---|---|
abstract T |
reduce(T value1,
T value2)
The core method of ReduceFunction, combining two values into one value of the same type.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public abstract T reduce(T value1, T value2) throws Exception
ReduceFunction
reduce
in interface ReduceFunction<T>
value1
- The first value to combine.value2
- The second value to combine.Exception
- This method may throw exceptions. Throwing an exception will cause the operation
to fail and may trigger recovery.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.