K
- The type of the key in the window.T
- The type of the elements in the window.W
- The type of the window.@PublicEvolving public class WindowedOperatorTransformation<T,K,W extends Window> extends Object
WindowedOperatorTransformation
represents a OneInputOperatorTransformation
for
bootstrapping window state.Modifier and Type | Method and Description |
---|---|
<ACC,R> BootstrapTransformation<T> |
aggregate(AggregateFunction<T,ACC,R> function)
Applies the given aggregation function to each window.
|
<ACC,R> BootstrapTransformation<T> |
aggregate(AggregateFunction<T,ACC,R> function,
TypeInformation<ACC> accumulatorType)
Applies the given aggregation function to each window.
|
<ACC,V,R> BootstrapTransformation<T> |
aggregate(AggregateFunction<T,ACC,V> aggFunction,
ProcessWindowFunction<V,R,K,W> windowFunction)
Applies the given window function to each window.
|
<ACC,V,R> BootstrapTransformation<T> |
aggregate(AggregateFunction<T,ACC,V> aggregateFunction,
ProcessWindowFunction<V,R,K,W> windowFunction,
TypeInformation<ACC> accumulatorType)
Applies the given window function to each window.
|
<ACC,V,R> BootstrapTransformation<T> |
aggregate(AggregateFunction<T,ACC,V> aggFunction,
WindowFunction<V,R,K,W> windowFunction)
Applies the given window function to each window.
|
<ACC,V,R> BootstrapTransformation<T> |
aggregate(AggregateFunction<T,ACC,V> aggregateFunction,
WindowFunction<V,R,K,W> windowFunction,
TypeInformation<ACC> accumulatorType)
Applies the given window function to each window.
|
<R> BootstrapTransformation<T> |
apply(WindowFunction<T,R,K,W> function)
Applies the given window function to each window.
|
<R> BootstrapTransformation<T> |
apply(WindowFunction<T,R,K,W> function,
TypeInformation<R> resultType)
Applies the given window function to each window.
|
WindowedOperatorTransformation<T,K,W> |
evictor(Evictor<? super T,? super W> evictor)
Sets the
Evictor that should be used to evict elements from a window before emission. |
<R> BootstrapTransformation<T> |
process(ProcessWindowFunction<T,R,K,W> function)
Applies the given window function to each window.
|
BootstrapTransformation<T> |
reduce(ReduceFunction<T> function)
Applies a reduce function to the window.
|
<R> BootstrapTransformation<T> |
reduce(ReduceFunction<T> reduceFunction,
ProcessWindowFunction<T,R,K,W> function)
Applies the given window function to each window.
|
<R> BootstrapTransformation<T> |
reduce(ReduceFunction<T> reduceFunction,
WindowFunction<T,R,K,W> function)
Applies the given window function to each window.
|
WindowedOperatorTransformation<T,K,W> |
trigger(Trigger<? super T,? super W> trigger)
Sets the
Trigger that should be used to trigger window emission. |
@PublicEvolving public WindowedOperatorTransformation<T,K,W> trigger(Trigger<? super T,? super W> trigger)
Trigger
that should be used to trigger window emission.@PublicEvolving public WindowedOperatorTransformation<T,K,W> evictor(Evictor<? super T,? super W> evictor)
Evictor
that should be used to evict elements from a window before emission.
Note: When using an evictor window performance will degrade significantly, since incremental aggregation of window results cannot be used.
public BootstrapTransformation<T> reduce(ReduceFunction<T> function)
This window will try and incrementally aggregate data as much as the window policies permit. For example, tumbling time windows can aggregate the data, meaning that only one element per key is stored. Sliding time windows will aggregate on the granularity of the slide interval, so a few elements are stored per key (one per slide interval). Custom windows may not be able to incrementally aggregate, or may need to store extra values in an aggregation tree.
function
- The reduce function.public <R> BootstrapTransformation<T> reduce(ReduceFunction<T> reduceFunction, WindowFunction<T,R,K,W> function)
Arriving data is incrementally aggregated using the given reducer.
reduceFunction
- The reduce function that is used for incremental aggregation.function
- The window function.@Internal public <R> BootstrapTransformation<T> reduce(ReduceFunction<T> reduceFunction, ProcessWindowFunction<T,R,K,W> function)
Arriving data is incrementally aggregated using the given reducer.
reduceFunction
- The reduce function that is used for incremental aggregation.function
- The window function.@PublicEvolving public <ACC,R> BootstrapTransformation<T> aggregate(AggregateFunction<T,ACC,R> function)
ACC
- The type of the AggregateFunction's accumulatorR
- The type of the elements in the resulting stream, equal to the AggregateFunction's
result typefunction
- The aggregation function.@PublicEvolving public <ACC,R> BootstrapTransformation<T> aggregate(AggregateFunction<T,ACC,R> function, TypeInformation<ACC> accumulatorType)
ACC
- The type of the AggregateFunction's accumulatorR
- The type of the elements in the resulting stream, equal to the AggregateFunction's
result typefunction
- The aggregation function.@PublicEvolving public <ACC,V,R> BootstrapTransformation<T> aggregate(AggregateFunction<T,ACC,V> aggFunction, WindowFunction<V,R,K,W> windowFunction)
Arriving data is incrementally aggregated using the given aggregate function. This means that the window function typically has only a single value to process when called.
ACC
- The type of the AggregateFunction's accumulatorV
- The type of AggregateFunction's result, and the WindowFunction's inputR
- The type of the elements in the resulting stream, equal to the WindowFunction's
result typeaggFunction
- The aggregate function that is used for incremental aggregation.windowFunction
- The window function.@PublicEvolving public <ACC,V,R> BootstrapTransformation<T> aggregate(AggregateFunction<T,ACC,V> aggregateFunction, WindowFunction<V,R,K,W> windowFunction, TypeInformation<ACC> accumulatorType)
Arriving data is incrementally aggregated using the given aggregate function. This means that the window function typically has only a single value to process when called.
ACC
- The type of the AggregateFunction's accumulatorV
- The type of AggregateFunction's result, and the WindowFunction's inputR
- The type of the elements in the resulting stream, equal to the WindowFunction's
result typeaggregateFunction
- The aggregation function that is used for incremental aggregation.windowFunction
- The window function.accumulatorType
- Type information for the internal accumulator type of the aggregation
function@PublicEvolving public <ACC,V,R> BootstrapTransformation<T> aggregate(AggregateFunction<T,ACC,V> aggFunction, ProcessWindowFunction<V,R,K,W> windowFunction)
Arriving data is incrementally aggregated using the given aggregate function. This means that the window function typically has only a single value to process when called.
ACC
- The type of the AggregateFunction's accumulatorV
- The type of AggregateFunction's result, and the WindowFunction's inputR
- The type of the elements in the resulting stream, equal to the WindowFunction's
result typeaggFunction
- The aggregate function that is used for incremental aggregation.windowFunction
- The window function.@PublicEvolving public <ACC,V,R> BootstrapTransformation<T> aggregate(AggregateFunction<T,ACC,V> aggregateFunction, ProcessWindowFunction<V,R,K,W> windowFunction, TypeInformation<ACC> accumulatorType)
Arriving data is incrementally aggregated using the given aggregate function. This means that the window function typically has only a single value to process when called.
ACC
- The type of the AggregateFunction's accumulatorV
- The type of AggregateFunction's result, and the WindowFunction's inputR
- The type of the elements in the resulting stream, equal to the WindowFunction's
result typeaggregateFunction
- The aggregation function that is used for incremental aggregation.windowFunction
- The window function.accumulatorType
- Type information for the internal accumulator type of the aggregation
functionpublic <R> BootstrapTransformation<T> apply(WindowFunction<T,R,K,W> function)
Note that this function requires that all data in the windows is buffered until the window is evaluated, as the function provides no means of incremental aggregation.
function
- The window function.public <R> BootstrapTransformation<T> apply(WindowFunction<T,R,K,W> function, TypeInformation<R> resultType)
Note that this function requires that all data in the windows is buffered until the window is evaluated, as the function provides no means of incremental aggregation.
function
- The window function.resultType
- Type information for the result type of the window function@PublicEvolving public <R> BootstrapTransformation<T> process(ProcessWindowFunction<T,R,K,W> function)
Note that this function requires that all data in the windows is buffered until the window is evaluated, as the function provides no means of incremental aggregation.
function
- The window function.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.