{"id":27056,"date":"2024-11-24T09:21:17","date_gmt":"2024-11-24T01:21:17","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27056\/"},"modified":"2024-11-24T09:21:17","modified_gmt":"2024-11-24T01:21:17","slug":"%e4%bd%bf%e7%94%a8-flink-connector-mysql-cdc-%e7%9b%91%e5%90%ac%e4%ba%8c%e8%bf%9b%e5%88%b6%e4%b8%bb%e9%94%ae%e7%9a%84-mysql-%e8%a1%a8%e6%97%b6%e5%87%ba%e7%8e%b0%e5%bc%82%e5%b8%b8%e8%af%a5%e5%a6%82-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27056\/","title":{"rendered":"\u4f7f\u7528 Flink-Connector-MySQL-CDC \u76d1\u542c\u4e8c\u8fdb\u5236\u4e3b\u952e\u7684 MySQL \u8868\u65f6\u51fa\u73b0\u5f02\u5e38\u8be5\u5982\u4f55\u5904\u7406\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173115270335774.jpg\" class=\"aligncenter\" title=\"\u4f7f\u7528 Flink-Connector-MySQL-CDC \u76d1\u542c\u4e8c\u8fdb\u5236\u4e3b\u952e\u7684 MySQL \u8868\u65f6\u51fa\u73b0\u5f02\u5e38\u8be5\u5982\u4f55\u5904\u7406\uff1f\u63d2\u56fe\" alt=\"\u4f7f\u7528 Flink-Connector-MySQL-CDC \u76d1\u542c\u4e8c\u8fdb\u5236\u4e3b\u952e\u7684 MySQL \u8868\u65f6\u51fa\u73b0\u5f02\u5e38\u8be5\u5982\u4f55\u5904\u7406\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4f7f\u7528 flink-connector&#8211;cdc \u76d1\u542c\u4e8c\u8fdb\u5236\u683c\u5f0f\u4e3b\u952e\u7684 mysql \u65f6\u51fa\u73b0\u5f02\u5e38\u5904\u7406<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 flink-connector-mysql-cdc 2.1.1 \u76d1\u542c mysql \u65f6\uff0c\u5982\u679c mysql \u8868\u7684\u4e3b\u952e\u662f\u4e8c\u8fdb\u5236\u683c\u5f0f\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n<pre>org.apache.flink.util.FlinkRuntimeException: **Generate Splits for table \u3002\u3002\u3002 error**\nCaused by: java.lang.ClassCastException: **[B cannot be cast to java.lang.Comparable**<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8be5\u5f02\u5e38\u662f\u7531\u62c6\u5206\u8868\u65f6\u51fa\u73b0 classcastexception \u6240\u81f4\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>\u5347\u7ea7\u7248\u672c<\/strong>\uff1a\u66f4\u65b0\u5230 flink-connector-mysql-cdc \u7684\u6700\u65b0\u7248\u672c\uff08\u4f8b\u5982 2.1.2\uff09\uff0c\u8be5\u7248\u672c\u4fee\u590d\u4e86\u6b64\u95ee\u9898\u3002<\/li>\n<li> <strong>\u63d0\u4ea4 issues<\/strong>\uff1a\u5728 hub \u4e0a\u63d0\u4ea4 issues\uff0c\u53ef\u4ee5\u53c2\u8003 ververica \u5b98\u65b9\u63d0\u4f9b\u7684\u94fe\u63a5\uff1ahttps:\/\/github.com\/ververica\/flink-cdc-connectors\/issues\/2746<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4f7f\u7528 Flink-Connector-MySQL-CDC \u76d1\u542c\u4e8c\u8fdb\u5236\u4e3b\u952e\u7684 MySQL \u8868\u65f6\u51fa\u73b0\u5f02\u5e38\u8be5\u5982\u4f55\u5904\u7406\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f7f\u7528 flink-connector&#8211;cdc \u76d1\u542c\u4e8c\u8fdb\u5236\u683c\u5f0f\u4e3b\u952e\u7684 mysql \u65f6\u51fa\u73b0\u5f02\u5e38\u5904\u7406 \u5728\u4f7f\u7528 flink-connector-mysql-cdc 2.1.1 \u76d1\u542c mysql \u65f6\uff0c\u5982\u679c mysql \u8868\u7684\u4e3b\u952e\u662f\u4e8c\u8fdb\u5236\u683c\u5f0f\uff0c\u53ef\u80fd\u4f1a\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff1a org.apache.flink.util.FlinkRuntimeException: **Generate Splits for table \u3002\u3002\u3002 error** Caused by: java.lang.ClassCastException: **[B cannot be cast to java.lang.Comparable** \u767b\u5f55\u540e\u590d\u5236 \u8be5\u5f02\u5e38\u662f\u7531\u62c6\u5206\u8868\u65f6\u51fa\u73b0 classcastexception \u6240\u81f4\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u5347\u7ea7\u7248\u672c\uff1a\u66f4\u65b0\u5230 flink-connector-mysql-cdc \u7684\u6700\u65b0\u7248\u672c\uff08\u4f8b\u5982 2.1.2\uff09\uff0c\u8be5\u7248\u672c\u4fee\u590d\u4e86\u6b64\u95ee\u9898\u3002 \u63d0\u4ea4 issues\uff1a\u5728 hub \u4e0a\u63d0\u4ea4 issues\uff0c\u53ef\u4ee5\u53c2\u8003 ververica \u5b98\u65b9\u63d0\u4f9b\u7684\u94fe\u63a5\uff1ahttps:\/\/github.com\/ververica\/flink-cdc-connectors\/issues\/2746 \u4ee5\u4e0a\u5c31\u662f\u4f7f\u7528 Flink-Connector-MySQL-CDC \u76d1\u542c\u4e8c\u8fdb\u5236\u4e3b\u952e\u7684 MySQL \u8868\u65f6\u51fa\u73b0\u5f02\u5e38\u8be5\u5982\u4f55\u5904\u7406\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27056","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27056"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27056\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}