You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Krishna <re...@gmail.com> on 2016/01/26 19:49:45 UTC

Window range in Spark

Hi,

We receive bursts of data with sequential ids and I would like to find the
range for each burst-window.  What's the best way to find the "window"
ranges in Spark?

Input
-------
1
2
3
4
6
7
8
100
101
102
500
700
701
702
703
704

Output (window start, window end)
------------------------------------------------
1, 4
6, 8
100, 102
500, 500
700, 704