码迷,mamicode.com
首页 > 其他好文 > 详细

Flink流式计算

时间:2019-06-15 11:47:47      阅读:85      评论:0      收藏:0      [点我收藏+]

标签:com   ack   现在   ted   process   batch   The   app   str   

Structured Streaming

技术图片

  1. A stream is converted into a dynamic table.
  2. A continuous query is evaluated on the dynamic table yielding a new dynamic table.
  3. The resulting dynamic table is converted back into a stream.

Defining a Table on a Stream

 

技术图片

 Continuous Queries

技术图片

Handling Event-time

技术图片

TUMBLE(time_attr, interval),定义一个个连续的时间窗口,这样每行数据只可能出现在一个窗口内,窗口之间不会出现重叠Defines a tumbling time window. A tumbling time window assigns rows to non-overlapping, continuous windows with a fixed duration (interval). For example, a tumbling window of 5 minutes groups rows in 5 minutes intervals. Tumbling windows can be defined on event-time (stream + batch) or processing-time (stream).
TUMBLE_START(time_attr, interval). 返回时间窗口的下限时间戳.Returns the timestamp of the inclusive lower bound of the corresponding tumbling, hopping, or session window.

Handling Late Data

技术图片

Bob 12:54:00 ./xxx 到达时间14:01:00如何处理?

技术图片

Watermarks定义在cTime,允许延迟2hour, 14:00:00-2hour<13:00:00,窗口12:00:00-13::00:00仍保持
Watermarks定义在cTime,允许延迟5min,14:00:00-5min>13:00:00,时间窗口12:00:00-13:00:00已过期,数据被丢弃

 

Flink流式计算

标签:com   ack   现在   ted   process   batch   The   app   str   

原文地址:https://www.cnblogs.com/killianxu/p/11026800.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!