...
Code Block |
---|
kubectl exec -ti -n kfuse kafka-broker-0 -- bash |
Unset JMX_PORT
Code Block |
---|
unset JMX_PORT |
...
Code Block |
---|
cat > /bitnami/kafka/topics.json { "version": 1, "topics": [ { "topic": "kf_events_topic" }, { "topic": "kf_logs_metric_topic" }, { "topic": "kf_logs_topic" }, { "topic": "kf_metrics_topic" }, { "topic": "kf_traces_errors_topic" }, { "topic": "kf_traces_metric_topic" }, { "topic": "kf_traces_topic" }, { "topic": "logs_ingest_topic" } ] } |
Get the broker ids
Code Block |
---|
kubectl exec -ti -n kfuse kafka-zookeeper-0 -- bash |
Code Block |
---|
cd /opt/bitnami/zookeeper/bin
zkCli.sh -server localhost:2181
ls /brokers/ids # Gives the list of active brokers |
Use the ids in the next step
Get the current assignment (Note that the --broker-list should match the number of current configured brokers) The example command below is for setup with 3 Kafka brokers
Code Block |
---|
/opt/bitnami/kafka/bin/kafka-reassign-partitions.sh --bootstrap-server :9092 --generate --topics-to-move-json-file /bitnami/kafka/topics.json --broker-list 0,1,2*BROKER_IDS* |
The above command will print out the Current partition replica assignment
and Proposed partition reassignment configuration
. Ignore the proposed output. Only the Current partition replica assignment
is needed.
...