OnCallReadyStart learning

kafka-leader-election.sh: elect partition leaders: preferred or unclean

kafka-leader-election.sh [options]

Options you will use

--bootstrap-server <String: server to connect to>
REQUIRED: the Kafka broker(s) to connect to, host:port[,host:port]. Give more than one: the first may be the broker that is down.
--election-type <PREFERRED|UNCLEAN>
preferred: move leadership to the first replica if it is in the ISR; unclean: allow an out-of-sync replica (data loss).
--all-topic-partitions
every partition.
--topic <String>
one topic (with --partition).
--partition <Integer>
one partition.
--path-to-json-file <file>
the partitions to elect, as JSON.

Examples

$ kafka-leader-election.sh --bootstrap-server kafka-1:9092 --election-type preferred --all-topic-partitions

leaders back to the preferred replicas

Taught in

Try kafka-leader-election.sh in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.