Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

how to remove the service - KAFKA by API

avatar

we have cluster HDP 2.6.4 with 3 kafka brokers ( each broker installed on master machine )

we want to remove the service - KAFKA by API from the AMBARI

what is the API to delete the kafka-broker on each master machine?

what is the API to remove the KAFKA service ?

what the other steps to removed completely the kafka-brokers from the master machines?

74513-capture.png

capture.png

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

1. First Stop the Kafka Service

# curl -i -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.STOP.KAFKA","operation_level":{"level":"SERVICE","cluster_name":"NewCluster","service_name":"KAFKA"}},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/KAFKA


2. Delete the Kafka Service:

# curl -i -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/KAFKA

.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Michael Bronson

1. First Stop the Kafka Service

# curl -i -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"_PARSE_.STOP.KAFKA","operation_level":{"level":"SERVICE","cluster_name":"NewCluster","service_name":"KAFKA"}},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/KAFKA


2. Delete the Kafka Service:

# curl -i -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/KAFKA

.

avatar

@Jay when we "Delete the Kafka Service:" its also remove the kafka-broker?

Michael-Bronson

avatar
Master Mentor

@Michael Bronson

Yes, the complete Kafka service (including all the brokers will be deleted) when we will make the 2nd call.

But If you just want to delete a particular kafka Broker then you will need to make the API call on individual host_components.

# curl -i -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts/kafkahost1.example.com/host_compone...

.

avatar
Reader

Should we also delete Kafka topics before deleting the service? Will the topics still remain after deleting the service?