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已過期,數據被丟棄

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM