我正试着用德比津和Kafka治疗疾病控制中心。我在中注册了一个带有3个表的连接器 table.whitelist
并且它工作正常。下面是运行连接器的配置。
{"name":"xoom-eds-extactor","config":{"connector.class":"io.debezium.connector.mysql.MySqlConnector","database.user":"debezium","database.server.id":"1","database.hostname":"qa514dtc001.ord.qa001.xoom.com","database.password":"xoom123","database.history.kafka.bootstrap.servers":"eds-kafka1:9092","database.history.kafka.topic":"dbhistory.inventory","name":"xoom-eds-extactor","database.server.name":"MySQL-Database-Docker","database.port":"3306","include.schema.changes":"true","table.whitelist":"xoom_eds_extraction_src_db_mock.postal_code_mock,xoom_eds_extraction_src_db_mock.account_number_mock,xoom_eds_extraction_src_db_mock.credit_card_number_mock,xoom_eds_extraction_src_db_mock.ip_address_details_mock,xoom_eds_extraction_src_db_mock.university_details_mock"},"tasks":[{"connector":"xoom-eds-extactor","task":0}],"type":"source"}
现在我想更新连接器并从同一个数据库中再添加两个表。我正在使用以下命令和配置文件来更新连接器。
命令:
curl -X PUT -H "Content-Type: application/json" --data @xoom-eds-extactor-conf.json "http://eds-kafka1:8083/connectors/xoom-eds-extactor/config"
配置json:
{
"name":"xoom-eds-extactor",
"connector.class":"io.debezium.connector.mysql.MySqlConnector",
"database.hostname":"qa514dtc001.ord.qa001.xoom.com",
"database.port":"3306",
"database.user":"debezium",
"database.password":"xoom123",
"database.server.id":"1",
"database.server.name":"MySQL-Database-Docker",
"database.history.kafka.bootstrap.servers":"eds-kafka1:9092",
"database.history.kafka.topic":"dbhistory.inventory",
"include.schema.changes":"true",
"table.whitelist":"xoom_eds_extraction_src_db_mock.postal_code_mock,xoom_eds_extraction_src_db_mock.account_number_mock,xoom_eds_extraction_src_db_mock.credit_card_number_mock,xoom_eds_extraction_src_db_mock.ip_address_details_mock,xoom_eds_extraction_src_db_mock.university_details_mock"
}
这执行成功,但当我列出Kafka主题只有最后3个主题是目前的2个新的主题没有添加。
MySQL-Database-Docker
MySQL-Database-Docker.xoom_eds_extraction_src_db_mock.account_number_mock
MySQL-Database-Docker.xoom_eds_extraction_src_db_mock.credit_card_number_mock
MySQL-Database-Docker.xoom_eds_extraction_src_db_mock.postal_code_mock
__consumer_offsets
connect-configs
connect-offsets
connect-status
dbhistory.inventory
外面有人能帮我吗?提前谢谢。
1条答案
按热度按时间m3eecexj1#
据我所知,有一个旧的未决公关与此有关的问题,它应该已经被修复
0.9.1
释放。但是,如果您使用的是旧版本,您可以简单地按照以下步骤操作。添加新表,但不要写入它们
关闭连接器
更改筛选器配置并将快照模式设置为“仅架构\恢复”
删除(或重命名)现有数据库历史记录主题
重新启动连接器;这将重新创建db schema的内部历史记录,然后从先前记录的偏移量继续流式处理
开始写入新表
至少这是我们所做的(我们仍在使用)
0.8.2
).来源:debezium谷歌集团。