- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Kafka - simulating Brokers not being in sync (i.e. not in ISR)
Created ‎06-02-2017 07:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All, I've HDP 2.5 & Kafka 0.9
I've a sample Kafka consumer program pushing data into Kafka topic, and a producer reading data from Kafka topic.
I'm trying to simulate having one or more Kafka Brokers out of sync (i.e. not in ISR).
The idea is to kill the Leader of a partition, and to see if there is data loss because of the Brokers not being in-sync. Any tips on how to do that or if anyone has done this kind of testing ?
Created ‎06-02-2017 07:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think there is no better answer than this page I was jsut rading it some hours ago in the train it will just do exactly that ! kafka not in ISR
Created ‎06-25-2017 09:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may also need to check what 'unclean.leader.election.enable' is set to. For example if you have 3 replicas in ISR and you kill the leader, new leader will be elected from only those replicas which are in sync if unclean.leader.election.enable is set to false.
If unclean.leader.election.enable is set to true, then replicas not in ISR can also be elected as leader as a last resort for high availability which may result into data loss.
By default this property is set to true. So if you do not want data loss, it is recommended to set unclean.leader.election.enable=false.
For more details: http://kafka.apache.org/documentation.html#design_uncleanleader
Thank you!
