W
- 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 AggregateApplyAllWindowFunction<W extends Window,T,ACC,V,R> extends WrappingFunction<AllWindowFunction<V,R,W>> implements AllWindowFunction<T,R,W>
AllWindowFunction
that composes an AggregateFunction
and AllWindowFunction
.
Upon invocation, this first applies AggregateFunction
to the input, and then
finally the AllWindowFunction
to the single result element.wrappedFunction
Constructor and Description |
---|
AggregateApplyAllWindowFunction(AggregateFunction<T,ACC,V> aggFunction,
AllWindowFunction<V,R,W> windowFunction) |
Modifier and Type | Method and Description |
---|---|
void |
apply(W window,
Iterable<T> values,
Collector<R> out)
Evaluates the window and outputs none or several elements.
|
close, getWrappedFunction, open, setRuntimeContext
getIterationRuntimeContext, getRuntimeContext
public AggregateApplyAllWindowFunction(AggregateFunction<T,ACC,V> aggFunction, AllWindowFunction<V,R,W> windowFunction)
public void apply(W window, Iterable<T> values, Collector<R> out) throws Exception
AllWindowFunction
apply
in interface AllWindowFunction<T,R,W extends Window>
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–2020 The Apache Software Foundation. All rights reserved.