문제

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".

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top