美文网首页
Yelp: A stream processing pipeli

Yelp: A stream processing pipeli

作者: chenfh5 | 来源:发表于2017-12-18 22:59 被阅读10次

文章里面提到了2个问题,

  1. no state tracking
  2. do not support complex customized business logic
2个待解决问题

它们通过updateStateBykey(update_func)/mapWithState(update_func)来自定义该update过程。即,

  1. Attach expire date/time when events are first seen & state is initialized
  2. drop the state if it expires
  3. apply business logic to new events/current state
Yelp的解决方案 伪代码

我借用了该ppt的思路,试着回答了stackoverflow上面的一个类似提问,但是我自己没有亲身实现出来,只是觉得可能这是一个思路。在每个state initialization的时候初始化一些状态(timeout,control flag等),然后判断这个stages的去留。

相关文章

网友评论

      本文标题:Yelp: A stream processing pipeli

      本文链接:https://www.haomeiwen.com/subject/xmevwxtx.html