[英]Kafka connectors - Standalone mode
I am running file connector in standalone mode.我在独立模式下运行文件连接器。 I updated the sink connect properties file while connect is running.
我在连接运行时更新了接收器连接属性文件。 The changes are NOT reflected unless I restarted the connect such as
除非我重新启动连接,否则不会反映更改,例如
> bin/connect-standalone.sh config/connect-standalone.properties
> config/connect-file-source.properties
> config/connect-file-sink.properties
Is it possible to update the connect properties run time without restarting the connect again是否可以在不重新启动连接的情况下更新连接属性运行时间
No, this is not possible using standalone mode.不,这在独立模式下是不可能的。 This is another good reason to use distributed mode, in which you can add, update, and delete configuration whilst the worker is running using the REST interface.
这是使用分布式模式的另一个好理由,在这种模式下,您可以在工作程序运行时使用 REST 接口添加、更新和删除配置。 To create or update a connector you'd use
PUT
:要创建或更新连接器,您将使用
PUT
:
curl -i -X PUT -H "Content-Type:application/json" http://localhost:8083/connectors/source-file-01/config \
-d '{
"connector.class": "org.apache.kafka.connect.file.FileStreamSourceConnector",
"tasks.max": "1",
"file": "/usr/share/details.txt",
"topic": "KTest",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "org.apache.kafka.connect.storage.StringConverter",
"name": "file_source"
}'
To delete it you'd use要删除它,您将使用
curl -i -X DELETE -H "Content-Type:application/json" http://localhost:8083/connectors/source-file-01
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.