I was running my services that work with kafka already for a year and no spontaneous changes of leader happens. But for the last 2 weeks that started happens quite often. Kafka log on that:
What can cause switching leader? If there is info in some kafka documentation - please - just point the link. I've failed to find.
System configuration
kafka version: kafka_2.10-0.8.2.1
os: Red Hat Enterprise Linux Server release 6.5 (Santiago)
server.properties (differs from default):
Partition Leader Election is a process of electing a broker to be the leader of a partition. Use kafka-leader-election.sh utility for preferred or unclean leader election. Consult Demo: Using kafka-leader-election.sh. kafka-preferred-replica-election.sh tool has been deprecated since Kafka 2.4.
Perform the following steps: Log in to Kafka Manager. Choose Topic > List. Click the topic name (for example, topic-test) for which a partition leader is to be modified.
Kafka has the notion of leader and follower brokers. In Kafka, for each topic partition, one broker is chosen as the leader for the other brokers (the followers). One of the chief duties of the leader is to assign replication of topic partitions to the follower brokers.
A leader handles all read and write requests for a partition while the followers passively replicate the leader. Each server acts as a leader for some of its partitions and a follower for others so load is well balanced within the cluster.
It appears like lead broker is down for that partition. It might be that data directroy(log.dirs) configured in server.properties is out of space and broker is not able to accommodate. Also, what is replication factor of topic and cluster size of brokers?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With