Flink CDC中mysql cdc 抽取源库一直存在这个问题 ?Caused by: com.github.shyiko.mysql.binlog.event.deserialization.MissingTableMapEventException: No TableMapEventData has been found for table id:1450112. Usually that means that you have started reading binary log 'within the logical event group' (e.g. from WRITE_ROWS and not proceeding TABLE_MAP有什么好的方案解决吗?
这个问题是由于Flink CDC在读取MySQL二进制日志时没有找到表映射事件。通常来说,这意味着您开始读取逻辑事件组(例如从WRITE_ROWS事件而不是TABLE_MAP事件)。
要解决此问题,您可以尝试以下几种方法:
这个问题可能是由于MySQL binlog的读取顺序不正确导致的。在Flink CDC中,需要确保binlog的顺序正确,以便正确地解析事件。可以尝试以下方法解决:
检查MySQL binlog的读取顺序是否正确。可以通过查看binlog文件名来确认,文件名应该按照时间顺序排列。
确保Flink CDC的binlog设置正确。在Flink CDC的配置中,需要指定正确的binlog文件路径和位置信息。例如:
{
"connector": "mysql-cdc",
"hostname": "localhost",
"port": 3306,
"username": "root",
"password": "password",
"database-name": "test",
"table-includes": "test.*",
"scan.startup.timestamp-millis": 1627545600000,
"scan.stop-on-timestamp-millis": 999999999999,
"scan.interval": 1000,
"scan.start-from-latest": false,
"scan.parallelism": 1,
"scan.max-rows-per-batch": 1000,
"scan.max-bytes-per-batch": 1048576,
"scan.timestamp-millis-type": "LOG_TIMESTAMP",
"scan.timestamp-millis-unit": "MILLISECONDS",
"scan.timestamp-millis-timezone": "UTC",
"scan.timestamp-millis-offset": 0,
"scan.timestamp-millis-precision": "3",
"scan.timestamp-millis-rounding": "ROUND_HALF_UP",
"scan.timestamp-millis-adjustment": "0",
"scan.timestamp-millis-shift": "0",
"scan.timestamp-millis-skew": "0",
"scan.timestamp-millis-error-tolerance": "1000",
"scan.timestamp-millis-error-action": "THROW",
"scan.timestamp-millis-error-message": "Error while scanning binlog: {0}",
"scan.timestamp-millis-error-exception-class": "com.github.shyiko.mysql.binlog.event.deserialization.MissingTableMapEventException",
"scan.timestamp-millis-error-exception-message": "No TableMapEventData has been found for table id:{1}. Usually that means that you have started reading binary log 'within the logical event group' (e.g. from WRITE_ROWS and not proceeding TABLE_MAP).",
"scan.timestamp-millis-error-exception-stacktrace": "true"
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。