Class AggregateApplyWindowFunction<K,W extends Window,T,ACC,V,R>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.api.common.functions.WrappingFunction<WindowFunction<V,R,K,W>>
-
- org.apache.flink.streaming.api.functions.windowing.AggregateApplyWindowFunction<K,W,T,ACC,V,R>
-
- Type Parameters:
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
- All Implemented Interfaces:
Serializable
,Function
,RichFunction
,WindowFunction<T,R,K,W>
@Internal public class AggregateApplyWindowFunction<K,W extends Window,T,ACC,V,R> extends WrappingFunction<WindowFunction<V,R,K,W>> implements WindowFunction<T,R,K,W>
AWindowFunction
that composes anAggregateFunction
andWindowFunction
. Upon invocation, this first appliesAggregateFunction
to the input, and then finally theWindowFunction
to the single result element.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.functions.WrappingFunction
wrappedFunction
-
-
Constructor Summary
Constructors Constructor Description AggregateApplyWindowFunction(AggregateFunction<T,ACC,V> aggFunction, WindowFunction<V,R,K,W> windowFunction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(K key, W window, Iterable<T> values, 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
-
AggregateApplyWindowFunction
public AggregateApplyWindowFunction(AggregateFunction<T,ACC,V> aggFunction, WindowFunction<V,R,K,W> windowFunction)
-
-
Method Detail
-
apply
public void apply(K key, W window, Iterable<T> values, 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,ACC>
- Parameters:
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.- Throws:
Exception
- The function may throw exceptions to fail the program and trigger recovery.
-
-