@Internal public class ReduceApplyAllWindowFunction<W extends Window,T,R> extends WrappingFunction<AllWindowFunction<T,R,W>> implements AllWindowFunction<T,R,W>
AllWindowFunction
that is used for implementing a fold on a window configuration
that only allows AllWindowFunction
and cannot directly execute a ReduceFunction
.wrappedFunction
Constructor and Description |
---|
ReduceApplyAllWindowFunction(ReduceFunction<T> reduceFunction,
AllWindowFunction<T,R,W> windowFunction) |
Modifier and Type | Method and Description |
---|---|
void |
apply(W window,
Iterable<T> input,
Collector<R> out)
Evaluates the window and outputs none or several elements.
|
close, getWrappedFunction, open, setRuntimeContext
getIterationRuntimeContext, getRuntimeContext
public ReduceApplyAllWindowFunction(ReduceFunction<T> reduceFunction, AllWindowFunction<T,R,W> windowFunction)
public void apply(W window, Iterable<T> input, Collector<R> out) throws Exception
AllWindowFunction
apply
in interface AllWindowFunction<T,R,W extends Window>
window
- The window that is being evaluated.input
- The elements in the window being evaluated.out
- A collector for emitting elements.Exception
- The function may throw exceptions to fail the program and trigger recovery.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.