Rebalance after removing Kafka broker

When your application requires that you remove certain Kafka brokers, you can do so using the command line, and continue the rebalancing process with the remaining ones.

  1. In the command line, check the status of the Kafka cluster with the /kafka_cluster_state command.
  2. Check the status of Cruise Control with the /state command to make sure that everything is set before removing the broker.
  3. Run the /remove_broker command.
    See the REST API reference document for the needed endpoint parameter.
    Cruise Control displays the plan to move all the partitions from the broker that is removed to the other available brokers.
  4. Check the status of Cruise Control using the /state command.
  5. Check the status of the Kafka cluster with the /kafka_cluster_state command.
  6. Open Cloudera Manager.
  7. Remove the Kafka role from the cluster.
The Kafka cluster is fully functional even after the broker is removed.