Flink 的 emit 作用

flink 1.9

如下:

配置如下:

table.exec.emit.early-fire.enabled:true
table.exec.emit.early-fire.delay:60 s

early-fire.delay 就是每分钟输出一次结果的意思。

SQL 如下:

SELECT TUMBLE_ROWTIME(eventTime, interval ‘1’ day) AS rowtime, dimension, count(distinct id) as uvFROM personGROUP BY TUMBLE(eventTime, interval '1' day), dimension;

每天输出一次结果,但设置开启emit后,会按照上述配置,每1min输出1次结果(提前触发窗口计算,并输出结果),如果有变化才下发,反之不下发。

如果不管本次最新结果是否较上次发生变化都下发,则可设置【table.exec.emit.unchanged.enabled = true】

end

相关推荐
注:Stream Processing with Apache Flink网页版 Book Description With Early Release ebooks, you get books in their earliest form—the author's raw and unedited content as he or she writes—so you can take advantage of these technologies long before the official release of these titles. You’ll also receive updates when significant changes are made, new chapters are available, and the final ebook bundle is released. Get started with Apache Flink, the open source framework that enables you to process streaming data—such as user interactions, sensor data, and machine logs—as it arrives. With this practical guide, you’ll learn how to use Apache Flink’s stream processing APIs to implement, continuously run, and maintain real-world applications. Authors Fabian Hueske, one of Flink’s creators, and Vasia Kalavri, a core contributor to Flink’s graph processing API (Gelly), explains the fundamental concepts of parallel stream processing and shows you how streaming analytics differs from traditional batch data analysis. Software engineers, data engineers, and system administrators will learn the basics of Flink’s DataStream API, including the structure and components of a common Flink streaming application. Solve real-world problems with Apache Flink’s DataStream API Set up an environment for developing stream processing applications for Flink Design streaming applications and migrate periodic batch workloads to continuous streaming workloads Learn about windowed operations that process groups of records Ingest data streams into a DataStream application and emit a result stream into different storage systems Implement stateful and custom operators common in stream processing applications Operate, maintain, and update continuously running Flink streaming applications Explore several deployment options, including the setup of highly available installations
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页