Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am developing a StreamInsight application which is supposed to compute a function of every N inputs i.e. if N=10 then I want to compute:

x_1, x_2, ..., x_10  ---> output_1
x_11, x_12, ..., x_20 ---> output_2

etc.

So what I want is a Hopping Window, except parameterized on Count rather than Time stamp.

I can't use a Count Window because those produce output every time the count changes.

I am looking for suggestions on how to get around the lack of a "Hopping Count Window".

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
130 views
Welcome To Ask or Share your Answers For Others

1 Answer

Take a look at using a User-defined Stream Operator. Events will come into your operator one by one which will make it easy to maintain a collection of the last N events/inputs. Once you've received your Nth event, do the computation, clear your events/inputs collection, and return the result.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...