Flink流式計算
阿新 • • 發佈:2019-06-15
Structured Streaming
- A stream is converted into a dynamic table.
- A continuous query is evaluated on the dynamic table yielding a new dynamic table.
- 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).
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已過期,資料被丟棄
&n