简体   繁体   English

Kafka Connect:获取连接器配置

[英]Kafka Connect: Getting connector configuration

I have been testing with kafka connect.我一直在用 kafka connect 进行测试。 But for every connector I have to go and read the connector documentation to understand the configuration needed for the connectors.但是对于每个连接器,我必须 go 并阅读连接器文档以了解连接器所需的配置。 As far as I read the kafka connect API documentation I have seen to APIs to get the connector related data.据我阅读 kafka connect API 文档,我已经看到 API 以获取连接器相关数据。

GET /connector-plugins - return a list of connector plugins installed in the Kafka Connect cluster. GET /connector-plugins - 返回安装在 Kafka Connect 集群中的连接器插件列表。 Note that the API only checks for connectors on the worker that handles the request, which means you may see inconsistent results, especially during a rolling upgrade if you add new connector jars.请注意,API 仅检查处理请求的工作程序上的连接器,这意味着您可能会看到不一致的结果,尤其是在滚动升级期间,如果您添加新的连接器 jars。

PUT /connector-plugins/{connector-type}/config/validate - validate the provided configuration values against the configuration definition. PUT /connector-plugins/{connector-type}/config/validate - 根据配置定义验证提供的配置值。 This API performs per config validation, returns suggested values and error messages during validation.此 API 执行每个配置验证,在验证期间返回建议值和错误消息。

Rest of other APIs are related to created connectors.其他 API 的 Rest 与创建的连接器相关。 Is there anyway to get the configuration for the required connectors?有没有获得所需连接器的配置?

Is there anyway to get the configuration for the required connectors无论如何都可以获得所需连接器的配置

The validate endpoint does exactly that, and is what the Landoop Kafka Connect UI uses to provide errors for missing/misconfigured properties.验证端点正是这样做的,并且是 Landoop Kafka Connect UI 用来为缺少/错误配置的属性提供错误的方法。

The implementation details of how properties become required depends on the Importance level of the connector configuration, and for any non-high importance configs, referring documentation or source code (if available) would be best需要属性的实现细节取决于连接器配置的Importance级别,对于任何非高重要性配置,最好参考文档或源代码(如果可用)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM