Class ReduceApplyWindowFunction<K,W extends Window,T,R>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.WrappingFunction<WindowFunction<T,R,K,W>>
-
- org.apache.flink.streaming.api.functions.windowing.ReduceApplyWindowFunction<K,W,T,R>
-
- All Implemented Interfaces:
Serializable
,Function
,RichFunction
,WindowFunction<T,R,K,W>
@Internal public class ReduceApplyWindowFunction<K,W extends Window,T,R> extends WrappingFunction<WindowFunction<T,R,K,W>> implements WindowFunction<T,R,K,W>
InternalWindowFunction
that is used for implementing a fold on a window configuration that only allowsWindowFunction
and cannot directly execute aReduceFunction
.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.functions.WrappingFunction
wrappedFunction
-
-
Constructor Summary
Constructors Constructor Description ReduceApplyWindowFunction(ReduceFunction<T> reduceFunction, WindowFunction<T,R,K,W> windowFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(K k, W window, Iterable<T> input, Collector<R> out)
Evaluates the window and outputs none or several elements.-
Methods inherited from class org.apache.flink.api.common.functions.WrappingFunction
close, getWrappedFunction, open, setRuntimeContext
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext
-
-
-
-
Constructor Detail
-
ReduceApplyWindowFunction
public ReduceApplyWindowFunction(ReduceFunction<T> reduceFunction, WindowFunction<T,R,K,W> windowFunction)
-
-
Method Detail
-
apply
public void apply(K k, W window, Iterable<T> input, Collector<R> out) throws Exception
Description copied from interface:WindowFunction
Evaluates the window and outputs none or several elements.- Specified by:
apply
in interfaceWindowFunction<K,W extends Window,T,R>
- Parameters:
k
- The key for which this window is evaluated.window
- The window that is being evaluated.input
- The elements in the window being evaluated.out
- A collector for emitting elements.- Throws:
Exception
- The function may throw exceptions to fail the program and trigger recovery.
-
-