StreamInsight中的跳计数Windows [英] Hopping Count Windows in StreamInsight
问题描述
我正在开发一个StreamInsight应用程序,该应用程序应该计算每个 N 个输入的函数,即如果N = 10,那么我想计算:
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
等
所以我想要的是一个跳跃窗口,但在计数"而不是时间戳"上进行了参数设置.
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.
这篇关于StreamInsight中的跳计数Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!