Re: OffsetOutOfRange Error

2014-11-04 Thread Shangan Chen
Hi Jim, Maybe your consumer lagged behind the current smallest offset. And why it happened? you might take a look at this ticket https://issues.apache.org/jira/browse/KAFKA-1640 On Wed, Nov 5, 2014 at 8:46 AM, Guozhang Wang wrote: > Hi Jim, > > OffsetOutOfRange means that the partition's log of

Adding replicas to existing topic cause data loss in some partitions

2014-11-06 Thread Shangan Chen
I have a kafka cluster, every topic in it has only one replica. Recently I extend every topic with 2 replicas. Most topics work fine, but some large topics have some problems with part of partitions. Consumer throw offset OutOfRange exception, the fact is consumer request offset is bigger than the

Re: Adding replicas to existing topic cause data loss in some partitions

2014-11-11 Thread Shangan Chen
issue. > > Thanks, > > Jun > > On Thu, Nov 6, 2014 at 11:56 PM, Shangan Chen > wrote: > > > I have a kafka cluster, every topic in it has only one replica. Recently > I > > extend every topic with 2 replicas. Most topics work fine, but some large > >

isr never update

2014-11-21 Thread Shangan Chen
In the initial state all replicas are in isr list, but sometimes when I check the topic state, the replica can never become isr even if actually it is synchronized. I saw in the log, the leader print expand isr request,but did not work. I found a interesting thing, the shrink and expand request ha

Re: isr never update

2014-11-27 Thread Shangan Chen
d the > state-change log? > > Thanks, > > Jun > > On Fri, Nov 21, 2014 at 5:59 PM, Shangan Chen > wrote: > > > In the initial state all replicas are in isr list, but sometimes when I > > check the topic state, the replica can never become isr even if actually >

Re: isr never update

2014-12-02 Thread Shangan Chen
check the state-change log of the follower replica and see if it > received the corresponding LeaderAndIsr request? If so, could you check the > max lag jmx (http://kafka.apache.org/documentation.html) in the follower > replica to see what the lag is? > > Thanks, > > Jun >

Re: Better handling of exception in kafka.producer.async.DefaultEventHandler

2014-12-23 Thread Shangan Chen
handle() will throw the exception to the caller. In sync mode, client will receive the exception, but in async mode, there's an independent thread actually doing the sending. It's not easy to inform the caller except for blocking the queue. In practice, you can configure the retry times, and each t

question about usage of SimpleConsumer

2013-05-30 Thread shangan chen
In Kafka, the consumers are responsible for maintaining state information (offset) on what has been consumed (refer from kafka design page).high-level consumer api will store its consumption state in zookeeper, while simple consumer shoud deal with these things itself. My doubt is what happened wh

Re: question about usage of SimpleConsumer

2013-05-31 Thread shangan chen
t the > earliest/latest offset for that topic, partition. In your example, it will > get you the latest offset at the time of the request. > > Thanks, > Neha > > > On Thu, May 30, 2013 at 11:31 PM, shangan chen >wrote: > > > In Kafka, the consumers are respons

consumer can't consume data any more when change the number of kafka partitions

2013-06-03 Thread shangan chen
Today, I change the partition number from 2 to 6 in order to improve the consume performance, but when I restart the consumer, it can sometime consume some or nothing. Actually, producers are producing data all the time. I change back the partition, not work, rmr zookeeper consumer info, still not

Re: consumer can't consume data any more when change the number of kafka partitions

2013-06-03 Thread shangan chen
INFO consumer.FetcherRunnable: FetchRunnable-1 start fetching topic: login part: 0 offset: 385686015 from 192.168.111.51:9092 On Mon, Jun 3, 2013 at 3:06 PM, shangan chen wrote: > Today, I change the partition number from 2 to 6 in order to improve the > consume performance, but when I restart t

Re: consumer can't consume data any more when change the number of kafka partitions

2013-06-04 Thread shangan chen
1_49-1370253495793-26c03d19-1, > login-group_zjm_111_49-1370253496335-c9be525d-0, > login-group_zjm_111_49-1370253496335-c9be525d-1) > > Thanks, > > Jun > > > On Mon, Jun 3, 2013 at 4:04 AM, shangan chen >wrote: > > > This is a testing log in non-storm enviroment