flink barrier
时间: 2023-10-19 13:08:23 浏览: 110
Flink实战总结1
In Apache Flink, a barrier is a synchronization point that ensures that all records in a stream have been processed up to a certain point before continuing with further processing. Barriers are used in Flink's streaming engine to enable certain types of operations, such as windowing and stateful operations, that require synchronization across multiple parallel streams.
Flink uses two types of barriers: processing-time barriers and event-time barriers. Processing-time barriers are based on the system clock and are used to ensure that all records with timestamps less than or equal to a certain time have been processed. Event-time barriers are based on the timestamps of the records themselves and are used to ensure that all records with timestamps less than or equal to a certain watermark have been processed.
When a barrier is encountered in a Flink stream, the stream is paused until all records up to that point have been processed. Once all records have been processed, the stream can continue with further processing. This ensures that all records are processed in order and that any downstream operations that depend on the order of records are correctly synchronized.
阅读全文