Re: Producer can writes to a follower during preferred lead election?

2014-12-07 Thread Gwen Shapira
If you write to a non-leader partition, I'd expect you'd get NotLeaderForPartitionException (thrown by Partition.appendMessagesToLeader). This will get sent to the producer as error code 6. I don't see anything special in the producer side to handle this specific (although I'd expect a forced meta

Re: Producer can writes to a follower during preferred lead election?

2014-12-07 Thread Xiaoyu Wang
Thanks Gwen. This answers my question. On Sun, Dec 7, 2014 at 5:44 AM, Gwen Shapira wrote: > If you write to a non-leader partition, I'd expect you'd get > NotLeaderForPartitionException (thrown by > Partition.appendMessagesToLeader). > This will get sent to the producer as error code 6. > > I d

RE: Producer can writes to a follower during preferred lead election?

2014-12-07 Thread Thunder Stumpges
In this case B will return "not leader for partition" error as soon as the leader is re-elected and I imagine the producer will correct itself. -Thunder -Original Message- From: Xiaoyu Wang [xw...@rocketfuel.com] Received: Saturday, 06 Dec 2014, 6:49PM To: users@kafka.apache.org [users@

Trying to start Kafka

2014-12-07 Thread Mukul Jain
I am a newebee and just downloaded 0.8.2-beta following these instructions: *> tar xzf kafka-.tgz**> cd kafka-**> ./sbt update**> ./sbt package* following this link : http://kafka.apache.org/07/quickstart.html when I try following : *> bin/zookeeper-server-start.sh config/zookeeper.properties*

Re: Producer can writes to a follower during preferred lead election?

2014-12-07 Thread Xiaoyu Wang
On preferred replica election, controller sends LeaderAndIsr requests to brokers. Broker will handle the LeaderAndIsr request by either become a leader or become a follower. In the previous case, when A receive the call, it will try to become the leader and stop fetching from B; when B receive the

Re: Trying to start Kafka

2014-12-07 Thread Joe Stein
That is for a previous version. This is for the 0.8.2-beta quick start https://kafka.apache.org/082/documentation.html#quickstart /*** Joe Stein Founder, Principal Consultant Big Data Open Source Security LLC http://www.stealth.ly Twitter: @allthingsha