apache-kafka - 两个(Kafka)S3 连接器不能同时工作
问题描述
我有一个 Kafka Connect 在一个集群(3 个节点)中工作,带有 1 个连接器(主题 - > S3),一切都很好:
root@dev-kafka1 ~]# curl localhost:8083/connectors/s3-postgres/status | jq -r
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 219 100 219 0 0 36384 0 --:--:-- --:--:-- --:--:-- 43800
{
"name": "s3-postgres",
"connector": {
"state": "RUNNING",
"worker_id": "127.0.0.1:8083"
},
"tasks": [
{
"state": "RUNNING",
"id": 0,
"worker_id": "127.0.0.1:8083"
},
{
"state": "RUNNING",
"id": 1,
"worker_id": "127.0.0.1:8083"
}
],
"type": "sink"
}
但是当我创建另一个连接器时,任务状态总是这样:
[root@dev-kafka1 ~]# curl localhost:8083/connectors/s3-postgres6/status | jq -r
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 109 100 109 0 0 14347 0 --:--:-- --:--:-- --:--:-- 15571
{
"name": "s3-postgres6",
"connector": {
"state": "RUNNING",
"worker_id": "127.0.0.1:8083"
},
"tasks": [],
"type": "sink"
}
我不知道为什么我在配置中做错了同一个插件的两个连接器不能一起工作,如果我停止运行正常的连接器#1,重新启动后连接器#2,工作正常。有谁知道我应该在配置中改变什么?
解决方案
如果不搜索日志,很难说到底是什么问题,甚至可能暂时将日志更改为调试详细程度,但根据连接器属性,Kafka Connect 可能非常耗内存。
Therefore, I'd suggest running Connect itself on isolated machines from the Kafka brokers, and allowing Connect to take more heap size (the default is 2g in latest versions) by exporting the KAFKA_HEAP_OPTS
variable
推荐阅读
- r - 查找标记在组中少于以前的次数
- c# - C# - 将 XML 元素转换为连接字符串中的键值对
- android - Flutter Firebase - Release APK 与 Debug APK 不同
- mongodb - _id 找不到子文档
- javascript - 如何输入我的代码客户端日期和时间?
- apache-spark - 在 Pyspark Structured Streaming 中,如何在写入 Kafka 之前丢弃已经生成的输出?
- python - 为什么在没有 sudo 的情况下使用 sudo 安装 netfilterqueue 不起作用 python 找到了模块
- c - 创建一个指向存储在另一个地址的地址的指针
- swift - 当用户切换到暗模式时,无法更新 UINavigationBar tintColor
- html - 如何对响应式导航栏进行排序