Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Timestamps on Results of Window Operations

 

...

When using timestamp based windows the timestamp that get's attached to the result of a windowing operation becomes important. For example, because the timestamp is used in downstream window operations (as we will see below).

Code Block
languagescala
titleDataStream Example
linenumberstrue
val stream: DataStream[MyType] = env.createStream(new KafkaSource(...))
val windowed: DataStream[MyType] = stream
  .keyBy(...)
  .window(...)
  .reduce { ... }

This is also true for the following example where the operator gets the whole group if elements with the same key inside a window:

Code Block
languagescala
titleDataStream Example
linenumberstrue
val stream: DataStream[MyType] = env.createStream(new KafkaSource(...))
val windowed: DataStream[MyType] = stream
  .keyBy(...)
  .window(...)
  .reduceGroup { ... }

Sematics of Sequences of Windows

...