Welcome to the Cloudera Community

Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Who agreed with this topic

Service has 0 Kafka Brokers. Kafka requires at least 1 Kafka Broker

avatar
New Contributor

This problem is related to CM API. The error is thrown when creating service ApiCluster.create_service(). Although this problem can be avoided by manually adding the role instance through Kafka service -> Instances -> Add Role Instances -> Kafka Broker, I would like to programatically adding this (instead of manually operation).

 

However I don't see any related examples in cloudera forum, nor in cloudera github. 

 

Observing the output

 

<ApiList>(3): [<ApiRoleConfigGroup>: Kafka-GATEWAY-BASE (cluster: Cluster 1; service: Kafka), <ApiRoleConfigGroup>: Kafka-KAFKA_MIRROR_MAKER-BASE (cluster: Cluster 1; service: Kafka), <ApiRoleConfigGroup>: Kafka-KAFKA_BROKER-BASE (cluster: Cluster 1; service: Kafka)]

 

Kafka role for broker has already been there after calling ApiCluster.create_service(). So how can I associate the instance with role? Any code snippet?

 

Can it be done through ApiRoleConfigGroup.update_config()? If so what config content should be provided?

 

Thank you

Who agreed with this topic