Re: High Level Consumer Iterator IllegalStateException Issue

2014-11-04 Thread Bhavesh Mistry
Hi Neha and Jun, I have fixed the issue on my side based on what Jun had mentioned "next() gives IllegalStateException if hasNext is not called..." Based on this I did further debug, I was my mistake sharing same consumer iterator across multiple threads so (I forgot to call iterator.remove() in

Re: High Level Consumer Iterator IllegalStateException Issue

2014-11-03 Thread Jun Rao
Bhavesh, That example has a lot of code. Could you provide a simpler test that demonstrates the problem? Thanks, Jun On Fri, Oct 31, 2014 at 10:07 PM, Bhavesh Mistry wrote: > Hi Jun, > > Here is code base: > > https://github.com/bmistry13/kafka-trunk-producer/blob/master/KafkaConsumerWithDela

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-31 Thread Bhavesh Mistry
Hi Jun, Here is code base: https://github.com/bmistry13/kafka-trunk-producer/blob/master/KafkaConsumerWithDelay.java Please let me know if you can help me determine the root cause. Why there is illegal state and blocking ? Thanks, Bhavesh On Fri, Oct 31, 2014 at 8:33 AM, Jun Rao wrote: >

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-31 Thread Jun Rao
Do you have a simple test that can reproduce this issue? Thanks, Jun On Thu, Oct 30, 2014 at 8:34 PM, Bhavesh Mistry wrote: > HI Jun, > > Consumer Connector is not closed because I can see the ConsumerFetcher > Thread alive but Blocked on *put* and hasNext() is blocked on *take*. > This is wha

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-30 Thread Bhavesh Mistry
HI Jun, Consumer Connector is not closed because I can see the ConsumerFetcher Thread alive but Blocked on *put* and hasNext() is blocked on *take*. This is what I see after recovery. Thanks, Bhavesh On Thu, Oct 30, 2014 at 11:42 AM, Jun Rao wrote: > Another possibility is that the consumer

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-30 Thread Jun Rao
Another possibility is that the consumer connector is already closed and then you call hasNext() on the iterator. Thanks, Jun On Wed, Oct 29, 2014 at 9:06 PM, Bhavesh Mistry wrote: > Hi Jun, > > The hasNext() itself throws this error. I have to manually reset state and > sometime it is able

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-29 Thread Bhavesh Mistry
Hi Jun, The hasNext() itself throws this error. I have to manually reset state and sometime it is able to recover and other it is not. Any other clue ? public boolean hasNext() { LOG.info("called of hasNext() :"); int retry = 3; while(retry > 0){

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-29 Thread Jun Rao
The IllegalStateException typically happens if you call next() before hasNext() on the iterator. Thanks, Jun On Tue, Oct 28, 2014 at 10:50 AM, Bhavesh Mistry wrote: > Hi Neha, > > Thanks for your answer. Can you please let me know how I can resolve the > Iterator IllegalStateException ? I wo

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-28 Thread Bhavesh Mistry
Hi Neha, Thanks for your answer. Can you please let me know how I can resolve the Iterator IllegalStateException ? I would appreciate your is this is bug I can file one or let me know if this is use case specific ? Thanks, Bhavesh On Tue, Oct 28, 2014 at 9:30 AM, Neha Narkhede wrote: > queu

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-28 Thread Neha Narkhede
queued.max.message.chunks controls the consumer's fetcher queue. On Mon, Oct 27, 2014 at 9:32 PM, Bhavesh Mistry wrote: > HI Neha, > > If I solved the problem number 1 think and number 2 will be solved (prob > 1 is causing problem number 2(blocked)). Can you please let me know what > controls

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-27 Thread Bhavesh Mistry
HI Neha, If I solved the problem number 1 think and number 2 will be solved (prob 1 is causing problem number 2(blocked)). Can you please let me know what controls the queue size for *ConsumerFetcherThread* thread ? Please see the attached java source code which will reproduce the problem. You

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-27 Thread Neha Narkhede
>> Sometime it give following exception. It will help to have a more specific test case that reproduces the failed iterator state. Also, the consumer threads block if the fetcher queue is full. The queue can fill up if your consumer thread dies or slows down. I'd recommend you ensure that all you

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-27 Thread Bhavesh Mistry
Hi Neha, I have two problems:. Any help is greatly appreciated. 1)* java.lang.IllegalStateException: Iterator is in failed state* ConsumerConnector consumerConnector = Consumer .createJavaConsumerConnector(getConsumerConfig()); Map topicCountMap = new HashMap()

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-26 Thread Neha Narkhede
Can you provide the steps to reproduce this issue? On Fri, Oct 24, 2014 at 6:11 PM, Bhavesh Mistry wrote: > I am using one from the Kafka Trunk branch. > > Thanks, > > Bhavesh > > On Fri, Oct 24, 2014 at 5:24 PM, Neha Narkhede > wrote: > > > Which version of Kafka are you using on the consumer?

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-24 Thread Bhavesh Mistry
I am using one from the Kafka Trunk branch. Thanks, Bhavesh On Fri, Oct 24, 2014 at 5:24 PM, Neha Narkhede wrote: > Which version of Kafka are you using on the consumer? > > On Fri, Oct 24, 2014 at 4:14 PM, Bhavesh Mistry < > mistry.p.bhav...@gmail.com> > wrote: > > > HI Kafka Community , > >

Re: High Level Consumer Iterator IllegalStateException Issue

2014-10-24 Thread Neha Narkhede
Which version of Kafka are you using on the consumer? On Fri, Oct 24, 2014 at 4:14 PM, Bhavesh Mistry wrote: > HI Kafka Community , > > I am using kafka trunk source code and I get following exception. What > could cause the iterator to have FAILED state. Please let me know how I > can fix thi

High Level Consumer Iterator IllegalStateException Issue

2014-10-24 Thread Bhavesh Mistry
HI Kafka Community , I am using kafka trunk source code and I get following exception. What could cause the iterator to have FAILED state. Please let me know how I can fix this issue. *java.lang.IllegalStateException: Iterator is in failed stateat kafka.utils.IteratorTemplate.hasNext(It