Re: Unexpected broker election

2014-02-21 Thread Jun Rao
So, it sounds like you want the leader to be moved back to the failed broker that has caught up. For now, you can use this tool ( https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-2.PreferredReplicaLeaderElectionTool). In 0.8.1 release, we have an option to balanc

Re: New Consumer API discussion

2014-02-21 Thread Jay Kreps
Yes but the problem is that poll() actually has side effects if you are using auto commit. So you have to do an awkward thing were you track the last offset you've seen and somehow keep this up to date as the partitions you own changes. Likewise if you want this value prior to reading any messages

Re: New Consumer API discussion

2014-02-21 Thread Jun Rao
Robert, Could you explain why you want to distinguish btw FetchingInProgressException and NoMessagePendingException? The nextMsgs() method that you want is exactly what poll() does. Thanks, Jun On Wed, Feb 19, 2014 at 8:45 AM, Withers, Robert wrote: > I am not clear on why the consumer stream

Re: New Consumer API discussion

2014-02-21 Thread Jun Rao
What's the use case of position()? Isn't that just the nextOffset() on the last message returned from poll()? Thanks, Jun On Sun, Feb 16, 2014 at 9:12 AM, Jay Kreps wrote: > +1 I think those are good. It is a little weird that changing the fetch > point is not batched but changing the commit

Re: broker offline

2014-02-21 Thread Guozhang Wang
Yes, it will be queued, and the second rebalance will start right after the first one. On Fri, Feb 21, 2014 at 8:50 AM, Yu, Libo wrote: > In our case, two brokers were offline. When the first broker was offline, > that would trigger a rebalance. When the second broker was offline, if the > cons

Unexpected broker election

2014-02-21 Thread Andrew Otto
Hi all, This has happened a couple of times to me now in the past month, and I’m not entirely sure of the cause, although I have a suspicion. Early this morning (UTC), it looks like one of my two brokers (id 21) lost its connection to Zookeeper for a very short period of time. This caused the

RE: broker offline

2014-02-21 Thread Yu, Libo
In our case, two brokers were offline. When the first broker was offline, that would trigger a rebalance. When the second broker was offline, if the consumers were in the process of rebalance, what do we expect? Is the second rebalance request queued? Regards, Libo -Original Message-

Re: producer not pushing the data into broker

2014-02-21 Thread Jun Rao
Could you do a list topic and show the output? Also, any error in the controller and state-change log? Thanks, Jun On Fri, Feb 21, 2014 at 2:33 AM, Arjun wrote: > hi, > > I am testing kafka 0.8 on my local machine. i have only one zookeeper and > one kafka broker running. > > when i run the c

Re: Reg Exception in Kafka

2014-02-21 Thread Jun Rao
Maybe you need to add the port to the right security group? Thanks, Jun On Thu, Feb 20, 2014 at 9:58 PM, Balasubramanian Jayaraman (Contingent) < balasubramanian.jayara...@autodesk.com> wrote: > One point to note is that, I am trying to access the Kafka broker (located > in Amazon Cloud, EC2 i

producer not pushing the data into broker

2014-02-21 Thread Arjun
hi, I am testing kafka 0.8 on my local machine. i have only one zookeeper and one kafka broker running. when i run the console producer i get this error: [2014-02-21 16:01:20,512] WARN Error while fetching metadata [{TopicMetadata for topic test -> No partition metadata for topic test due to