T
- Type of the initial input and the returned elementO
- Type of the elements that the group/list/stream containsRichAggregateFunction
instead@Public @Deprecated public abstract class RichFoldFunction<O,T> extends AbstractRichFunction implements FoldFunction<O,T>
FoldFunction
. 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 |
---|
RichFoldFunction()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract T |
fold(T accumulator,
O value)
Deprecated.
The core method of FoldFunction, combining two values into one value of the same type.
|
close, getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public abstract T fold(T accumulator, O value) throws Exception
FoldFunction
fold
in interface FoldFunction<O,T>
accumulator
- The initial value, and accumulator.value
- The value from the group to "fold" into the accumulator.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.