07-20-2018 05:26 AM - edited 07-20-2018 05:27 AM
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?
07-20-2018 05:06 PM
The following may help with some examples of adding services:
07-23-2018 04:34 AM - edited 07-23-2018 04:44 AM
Sorry my question may be not clear enough. I've checked the github example deploycloudera.py previously. The problem is I am not sure what content to fill in when creating roles for Kafka. The examples neither include Kafka, nor any information pointing to Kafka config for associating role with broker. So I am wondering what info needed to be presented in variable e.g. KAFKA_ROLE_CONFIG. I suppose the content should be similar to XXXXXX_ROLE_CONFIG in the example, but don't know the constant key value bits. Are there any docs that may talk about this or any link that may contain relevent info?
Appreciate any suggestions, thanks.