Constructor and Description |
---|
OnWindowedStream(WindowedStream<T,K,W> stream) |
Modifier and Type | Method and Description |
---|---|
<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)
Applies the given window function to each window.
|
<R> DataStream<R> |
foldWith(R initialValue,
scala.Function2<R,T,R> function,
TypeInformation<R> evidence$1)
Applies the given fold function to each window.
|
DataStream<T> |
reduceWith(scala.Function2<T,T,T> function)
Applies a reduce function to the window.
|
public OnWindowedStream(WindowedStream<T,K,W> stream)
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.initialValue
- (undocumented)evidence$1
- (undocumented)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 foldfoldFunction
- The fold function that is used for incremental aggregationwindowFunction
- The window function.evidence$2
- (undocumented)evidence$3
- (undocumented)Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.