flink-connector-mysql-cdc 2.1.1 监听mysql,其中mysql的主键 是 二进制 格式,出现如下错误?

作者站长头像
站长
· 阅读数 4

使用flink-connector-mysql-cdc 2.1.1 监听mysql,其中mysql的主键 是 二进制 格式,出现如下错误。 请问各位大佬如何解决? 按照我的理解 是拆表的时候 出现的问题,应该不是反序列化的问题吧?

[pool-79-thread-1] INFO io.debezium.jdbc.JdbcConnection - Connection gracefully closed
[SourceCoordinator-Source: MySQL Source -> Sink: Print to Std. Out] ERROR org.apache.flink.runtime.source.coordinator.SourceCoordinator - Uncaught exception in the SplitEnumerator for Source Source: MySQL Source -> Sink: Print to Std. Out while handling operator event RequestSplitEvent (host='') from subtask 0. Triggering job failover.
org.apache.flink.util.FlinkRuntimeException: **Generate Splits for table 。。。 error**
    at com.ververica.cdc.connectors.mysql.source.assigners.ChunkSplitter.generateSplits(ChunkSplitter.java:115)
    at com.ververica.cdc.connectors.mysql.source.assigners.MySqlSnapshotSplitAssigner.getNext(MySqlSnapshotSplitAssigner.java:168)
    at com.ververica.cdc.connectors.mysql.source.assigners.MySqlHybridSplitAssigner.getNext(MySqlHybridSplitAssigner.java:113)
    at com.ververica.cdc.connectors.mysql.source.enumerator.MySqlSourceEnumerator.assignSplits(MySqlSourceEnumerator.java:167)
    at com.ververica.cdc.connectors.mysql.source.enumerator.MySqlSourceEnumerator.handleSplitRequest(MySqlSourceEnumerator.java:98)
    at org.apache.flink.runtime.source.coordinator.SourceCoordinator.lambda$handleEventFromOperator$1(SourceCoordinator.java:172)
    at org.apache.flink.runtime.source.coordinator.SourceCoordinator.lambda$runInEventLoop$8(SourceCoordinator.java:331)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.ClassCastException: **[B cannot be cast to java.lang.Comparable**
    at com.ververica.cdc.connectors.mysql.source.utils.ObjectUtils.compare(ObjectUtils.java:86)
    at com.ververica.cdc.connectors.mysql.source.assigners.ChunkSplitter.nextChunkEnd(ChunkSplitter.java:239)
    at com.ververica.cdc.connectors.mysql.source.assigners.ChunkSplitter.splitUnevenlySizedChunks(ChunkSplitter.java:208)
    at com.ververica.cdc.connectors.mysql.source.assigners.ChunkSplitter.splitTableIntoChunks(ChunkSplitter.java:162)
    at com.ververica.c
回复
1个回答
avatar
test
2024-06-24

在github提了issues

最终生版本就可以了

https://github.com/ververica/flink-cdc-connectors/issues/2746

回复
likes
适合作为回答的
  • 经过验证的有效解决办法
  • 自己的经验指引,对解决问题有帮助
  • 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
  • 询问内容细节或回复楼层
  • 与题目无关的内容
  • “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容