Versions Compared

Key

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

...

Code Block
languagescala
titleDataStream Example
linenumberstrue
val stream: DataStream[(Int, Int, Int)] = env.createStream(new KafkaSource(...))
val windowed: DataStream[(Int, Int, Int)] = stream
  .keyBy(0)
  .window(TimestampTime.of(5, SECONDS)
  .sumByKey(2)

  .keyBy(1)
  .window(TimestampTime.of(5, SECONDS))
  .minByKey(2)

...