Skip to content

Instantly share code, notes, and snippets.

@PierreZ
Last active January 3, 2019 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PierreZ/a0c12fe7388aba15949fbc80f99e48ea to your computer and use it in GitHub Desktop.
Save PierreZ/a0c12fe7388aba15949fbc80f99e48ea to your computer and use it in GitHub Desktop.
final DataStream<Tuple4<PlanIdentifier, Alert, Plan, Operation>> alertStream =
// Partitioning Stream per AlertIdentifier
cleanedAlertsStream.keyBy(0)
// Applying a Map Operation which is setting since when an alert is triggered
.map(new SetSinceOnSelector())
.name("setting-since-on-selector").uid("setting-since-on-selector")
// Partitioning again Stream per AlertIdentifier
.keyBy(0)
// Applying another Map Operation which is setting State and Trend
.map(new SetStateAndTrend())
.name("setting-state").uid("setting-state");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment