编程知识 cdmana.com

Kafka2.5->Flink1.12->Mysql8(转载+自己整理---沒弄完)

##############################################实验目的和环境##############################################################

本文是为了在最新的版本上复现[1],环境如下:

组件 版本
Zookeeper 3.6.0
Flink 1.12
Mysql 8.0.22-0ubuntu0.20.04.2
Kafka 2.5.0

 

############################################################################################################

Jark给的文件

文件的作用

kafka-common.sh

kafka生产端输入数据

 

kafka-consumer.sh kafka消费端

 

 

{"rowtime": "2018-03-12T08:00:00Z", "user_name": "Alice", "event": { "message_type": "WARNING", "message": "This is a warning."}}
{"rowtime": "2018-03-12T08:10:00Z", "user_name": "Alice", "event": { "message_type": "WARNING", "message": "This is a warning."}}
{"rowtime": "2018-03-12T09:00:00Z", "user_name": "Bob", "event": { "message_type": "WARNING", "message": "This is another warning."}}
{"rowtime": "2018-03-12T09:10:00Z", "user_name": "Alice", "event": { "message_type": "INFO", "message": "This is a info."}}
{"rowtime": "2018-03-12T09:20:00Z", "user_name": "Steve", "event": { "message_type": "INFO", "message": "This is another info."}}
{"rowtime": "2018-03-12T09:30:00Z", "user_name": "Steve", "event": { "message_type": "INFO", "message": "This is another info."}}
{"rowtime": "2018-03-12T09:30:00Z", "user_name": null, "event": { "message_type": "WARNING", "message": "This is a bad message because the user is missing."}}
{"rowtime": "2018-03-12T10:40:00Z", "user_name": "Bob", "event": { "message_type": "ERROR", "message": "This is an error."}}

############################################################################################################

 

 

Reference:

[1]Flink 1.9 实战:使用 SQL 读取 Kafka 并写入 MySQ

版权声明
本文为[Applied Sciences]所创,转载请带上原文链接,感谢
https://yuchi.blog.csdn.net/article/details/111645917

Scroll to Top