Flink流式计算

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已过期,数据被丢弃

 

posted on 2019-06-15 10:48 killianxu 阅读( ...) 评论( ...) 编辑 收藏
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值