K - The key typeW - The window typeT - The type of the input to the AggregateFunctionACC - The type of the AggregateFunction's accumulatorV - The type of the AggregateFunction's result, and the input to the WindowFunctionR - The result type of the WindowFunction@Internal public class AggregateApplyWindowFunction<K,W extends Window,T,ACC,V,R> extends org.apache.flink.api.java.operators.translation.WrappingFunction<WindowFunction<V,R,K,W>> implements WindowFunction<T,R,K,W>
WindowFunction that composes an AggregateFunction and WindowFunction.
Upon invocation, this first applies AggregateFunction to the input, and then finally the
WindowFunction to the single result element.| Constructor and Description |
|---|
AggregateApplyWindowFunction(org.apache.flink.api.common.functions.AggregateFunction<T,ACC,V> aggFunction,
WindowFunction<V,R,K,W> windowFunction) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(K key,
W window,
Iterable<T> values,
org.apache.flink.util.Collector<R> out)
Evaluates the window and outputs none or several elements.
|
close, getWrappedFunction, open, setRuntimeContextpublic void apply(K key, W window, Iterable<T> values, org.apache.flink.util.Collector<R> out) throws Exception
WindowFunctionapply in interface WindowFunction<T,R,K,W extends Window>key - The key for which this window is evaluated.window - The window that is being evaluated.values - 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–2021 The Apache Software Foundation. All rights reserved.