Skip to content

Instantly share code, notes, and snippets.

@alexvanboxel
Last active March 1, 2017 21:47
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 alexvanboxel/eb0bf067f59b2b965cc1e49a9c1cdef5 to your computer and use it in GitHub Desktop.
Save alexvanboxel/eb0bf067f59b2b965cc1e49a9c1cdef5 to your computer and use it in GitHub Desktop.
return input.apply("UserSessionWindows",
Window.<Event>into(Sessions.withGapDuration(Duration.standardMinutes(20)))
.withAllowedLateness(Duration.standardHours(1)))
.apply("SessionSwitch", ParDo.of(new SessionSwitchFn()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment