问题描述
我一直在尝试部署 nifi 集群,混合使用 zookeeper 和 nifi 注册表。我有 nifi 注册表和 nifi 通过 docker 部署。在 nifi 注册表的文档中,它显示进入 nifi UI 并为 nifi 注册表实例添加控制器服务。
有没有办法以编程方式为注册表创建控制器服务? (即在构建过程中创建 nifi 和 nifi 注册表之间的链接)
解决方法
注册客户端有一个 API 端点
POST /controller/registry-clients
查看 REST API 文档 here
Request
consumes: application/json
Name Location Type Description
body RegistryClientEntity The registry configuration details.
Response
produces: application/json
Status Code Type Description
200 RegistryClientEntity successful operation
400 string NiFi was unable to complete the request because it was invalid. The request should not be retried without modification.
401 string Client could not be authenticated.
403 string Client is not authorized to make this request.
409 string The request was valid but NiFi was not in the appropriate state to process it. Retrying the same request later may be successful.
Authorization
Write - /controller