|Constructor and Description|
|Modifier and Type||Method and Description|
Applies the given window function to each window.
Applies the given fold function to each window.
Applies a reduce function to the window.
public DataStream<T> reduceWith(scala.Function2<T,T,T> function)
This window will try and pre-aggregate data as much as the window policies permit. For example,tumbling time windows can perfectly pre-aggregate the data, meaning that only one element per key is stored. Sliding time windows will pre-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 pre-aggregate, or may need to store extra values in an aggregation tree.
function- The reduce function.
public <R> DataStream<R> foldWith(R initialValue, scala.Function2<R,T,R> function, TypeInformation<R> evidence$1)
function- The fold function.
public <ACC,R> DataStream<R> applyWith(ACC initialValue, scala.Function2<ACC,T,ACC> foldFunction, scala.Function3<K,W,scala.collection.immutable.Stream<ACC>,scala.collection.TraversableOnce<R>> windowFunction, TypeInformation<ACC> evidence$2, TypeInformation<R> evidence$3)
Arriving data is incrementally aggregated using the given fold function.
initialValue- The initial value of the fold
foldFunction- The fold function that is used for incremental aggregation
windowFunction- The window function.
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.