flink cdc 应用

ops/2024/11/19 14:08:25/

SQLServer

1. The db history topic or its content is fully or partially missing. Please check database history topic configuration and re-execute the snapshot.

遇到了一下问题,多次尝试,最终发现是数据库大小写要一致。

Caused by: io.debezium.DebeziumException: The db history topic or its content is fully or partially missing. Please check database history topic configuration and re-execute the snapshot.at io.debezium.relational.HistorizedRelationalDatabaseSchema.recover(HistorizedRelationalDatabaseSchema.java:59) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at io.debezium.schema.HistorizedDatabaseSchema.recover(HistorizedDatabaseSchema.java:38) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.cdc.connectors.sqlserver.source.reader.fetch.SqlServerSourceFetchTaskContext.validateAndLoadDatabaseHistory(SqlServerSourceFetchTaskContext.java:187) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.cdc.connectors.sqlserver.source.reader.fetch.SqlServerSourceFetchTaskContext.configure(SqlServerSourceFetchTaskContext.java:130) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.cdc.connectors.base.source.reader.external.IncrementalSourceStreamFetcher.submitTask(IncrementalSourceStreamFetcher.java:84) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.cdc.connectors.base.source.reader.IncrementalSourceSplitReader.submitStreamSplit(IncrementalSourceSplitReader.java:261) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.cdc.connectors.base.source.reader.IncrementalSourceSplitReader.pollSplitRecords(IncrementalSourceSplitReader.java:153) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.cdc.connectors.base.source.reader.IncrementalSourceSplitReader.fetch(IncrementalSourceSplitReader.java:98) ~[flink-sql-connector-sqlserver-cdc-3.2.0.jar:3.2.0]at org.apache.flink.connector.base.source.reader.fetcher.FetchTask.run(FetchTask.java:58) ~[flink-connector-files-1.20.0.jar:1.20.0]at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165) ~[flink-connector-files-1.20.0.jar:1.20.0]at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:117) ~[flink-connector-files-1.20.0.jar:1.20.0]at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
  CREATE TABLE Member_Extend (ID INT, MemberID INT,  PRIMARY KEY (ID) NOT ENFORCED) WITH ('connector' = 'sqlserver-cdc','hostname' = '192.168.1.3','port' = '1433','username' = 'test','password' = 'test','database-name' = 'CrmExtend','table-name' = 'dbo.Member_Extend');

作业安全启停


show jobs
Flink SQL> show jobs;
+----------------------------------+------------------------------------------------------------------+----------+-------------------------+
|                           job id |                                                         job name |   status |              start time |
+----------------------------------+------------------------------------------------------------------+----------+-------------------------+
| ce5a0e938563cf52317c5b9055ad102f| testjob |  RUNNING | 2024-11-15T03:38:47.919 |+----------------------------------+------------------------------------------------------------------+----------+-------------------------+
4 rows in setSET state.checkpoints.dir='s3://flink/cdc-1.20/savepoints';
stop job 'ce5a0e938563cf52317c5b9055ad102f' with savepoint;Flink SQL> stop job 'ce5a0e938563cf52317c5b9055ad102f' with savepoint;
+--------------------------------------------------------------+
|                                               savepoint path |
+--------------------------------------------------------------+
| s3://flink/cdc-1.20/savepoints/savepoint-ce5a0e-2935055bb307 |
+--------------------------------------------------------------+
1 row in setSET execution.savepoint.path='s3://flink/cdc-1.20/savepoints/savepoiznt-ce5a0e-2935055bb307';  
set 'execution.savepoint.ignore-unclaimed-state' = 'true'; 重新执行原有sqlinsert into flink_user select * from user ;

http://www.ppmy.cn/ops/134992.html

相关文章

centos7安装教程

以下是CentOS 7详细的安装教程: 一、准备工作 下载CentOS 7镜像文件 可以从CentOS官方网站(https://www.centos.org/download/)下载适合你硬件架构(如x86_64)的ISO镜像文件。准备USB或光盘 如果使用USB安装,需要一个容量不小于2GB的可引导USB。可以使用工具如Rufus(适用…

DNS记录类型详解(DNS Record Detailed Type)

💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 本人主要分享计算机核心技…

鸿蒙next判断程序安装后第一次启动,以及更新(覆盖安装)后第一次启动

目录 Android实现 iOS实现 鸿蒙next实现 鸿蒙获取包信息接口 真机调试后可以看到符合期望情况 额外问题 Android实现 https://juejin.cn/post/6844903728311435272 iOS实现 iOS小技巧13- 判断iOS App程序安装后第一次启动,更新后第一次启动_ios 数据持久化 判断是否…

c#加载shellcode

本地加载bin文件 SharpPELoader项目如下: using System; using System.IO; using System.Runtime.InteropServices;namespace TestShellCode {internal class Program{private const uint MEM_COMMIT 0x1000;private const uint PAGE_EXECUTE_READWRITE 0x40;pr…

单例模式(Singleton)

一、单例模式 1、相关知识: 内容:保证一个类只有一个实例,并提供一个访问它的全局访问点;其保证了在程序的不同位置都可以且仅可以取到同一个对象实例。 使用场景:当类只能有一个实例而且用户从多个地方访问同一个类的…

Ekman理论回归

Scientific reportsEkman revisited: Surface currents to the left of the winds in the Northern HemisphereVagn Walfrid Ekman1905年的理论描述了地球旋转受到风的作用,摩擦边界层中的流场,北半球总是在海表风的右侧,南半球总是在海表风的…

使用 OpenAI 提高 Appium 测试脚本效率:从优化到跨平台支持

#自动化测试工程师在使用 Appium 进行移动端测试时,经常需要面对以下挑战: 测试脚本结构混乱,难以维护和复用。复杂交互场景(如滑动、拖拽)脚本难以编写和调试。跨平台测试需要解决设备兼容性和平台差异。 本文将结合…