Created
April 30, 2017 09:10
-
-
Save enothereska/edb5d6ee83312fef42b8886cc2b97cb2 to your computer and use it in GitHub Desktop.
A Dataflow example with triggers and watermarks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PCollection<KV<String, Integer>> scores = input | |
.apply(Window.into(FixedWindows.of(Duration.standardMinutes(2))) | |
.triggering( | |
AtWatermark() | |
.withEarlyFirings(AtPeriod(Duration.standardMinutes(1))) | |
.withLateFirings(AtCount(1))) | |
.accumulatingAndRetractingFiredPanes()) | |
.apply(Sum.integersPerKey()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment