Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Kafka Python scripted start/stop

Kafka Python scripted start/stop

New Contributor

We want to start up and shut down Kafka via a Python script in place of using the Cloudera Manager Web Gui. The Cloudera documentation here: https://www.cloudera.com/documentation/enterprise/6/6.0/topics/kafka_admin_cli.html states; 
"Use Cloudera Manager to start and stop Kafka and Zookeeper services. Do not use the kafka-server-start, kafka-server-stop, zookeeper-server-start, or zookeeper-server-stop commands."

There's nothing we can do to start and stop Kafka in a scripted manner?


1 REPLY 1

Re: Kafka Python scripted start/stop

Super Guru

@gauravpurohit,

 

Once your cluster services are managed by Cloudera Manager, CM must be used to start/stop all services and roles.

Cloudera Manager has an API that lets you leverage the REST API, Python, or Java.

 

See:
https://cloudera.github.io/cm_api/

 

Here is an example a service start:
https://archive.cloudera.com/cm6/6.2.0/generic/jar/cm_api/swagger-html-sdk-docs/python/docs/Services...

and stop:

https://archive.cloudera.com/cm6/6.2.0/generic/jar/cm_api/swagger-html-sdk-docs/python/docs/Services...

 

The Python Doc is here:

https://archive.cloudera.com/cm6/6.2.0/generic/jar/cm_api/swagger-html-sdk-docs/python/README.html