gpt4 book ai didi

debezium - 如何删除 debezium 连接器

转载 作者:行者123 更新时间:2023-12-01 23:20:50 28 4
gpt4 key购买 nike

如何删除 debezium 连接器。我正在关注本教程 https://debezium.io/documentation/reference/tutorial.html我看到了注册连接器的方法,但不知道如何删除/更新连接器。

curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{ "name": "inventory-connector", "config": { "connector.class": "io.debezium.connector.mysql.MySqlConnector", "tasks.max": "1", "database.hostname": "mysql", "database.port": "3306", "database.user": "debezium", "database.password": "dbz", "database.server.id": "184054", "database.server.name": "dbserver1", "database.include.list": "inventory", "database.history.kafka.bootstrap.servers": "kafka:9092", "database.history.kafka.topic": "dbhistory.inventory" } }'

能否请您指点我提到删除和更新连接器的文档页面。

最佳答案

debezium connector 是一个标准的连接器,您可以将其插入到 kafka connet 框架中。 Kafka Connect 框架支持多个 REST 命令以便与其交互。

要删除你提交DELETE请求

curl -i -X DELETE localhost:8083/connectors/inventory-connector/

要更新配置,请使用新配置提交 PUT 请求

curl -i -X PUT -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/inventory-connector/config -d '{ "connector.class": "io.debezium.connector.mysql.MySqlConnector", "tasks.max": "1", "database.hostname": "mysql", "database.port": "3306", "database.user": "debezium", "database.password": "dbz", "database.server.id": "184054", "database.server.name": "dbserver1", "database.include.list": "inventory", "database.history.kafka.bootstrap.servers": "kafka:9092", "database.history.kafka.topic": "dbhistory.inventory" }'

更多 REST API 说明

https://docs.confluent.io/platform/current/connect/references/restapi.html

关于debezium - 如何删除 debezium 连接器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68105030/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com