Re: Question about function SimpleConsumer.getOffsetsBefore

2013-02-26 Thread Neha Narkhede
The best value for maxNumOffsets really depends on your use case, but like I said commonly it is set to 1. I don't think it will take long even if you set it to a high value. It is bounded by the number of segments for a log. Thanks, Neha On Mon, Feb 25, 2013 at 5:33 PM, Sining Ma wrote: > If

Re: Question about function SimpleConsumer.getOffsetsBefore

2013-02-25 Thread Sining Ma
If right now this function can return many offsets, will it take long time? Based on your experience, what is the best value for maxNumOffsets? Thanks, Sining Ma On Mon, Feb 25, 2013 at 5:24 PM, Neha Narkhede wrote: > The value of maxNumOffsets depends on what you are trying to accomplish. In

Re: Question about function SimpleConsumer.getOffsetsBefore

2013-02-25 Thread Neha Narkhede
The value of maxNumOffsets depends on what you are trying to accomplish. In most cases, this value is 1. For a value > 1, it gives you the first offset of the segments since the segment that matched your offset query. Even if you set a very high value, it will not have those many segments and hence

Question about function SimpleConsumer.getOffsetsBefore

2013-02-25 Thread Sining Ma
I have a question about function getOffsetsBefore() in class SimpleConsumer. I am not sure about the input value of maxNumOffsets. If I set this value to a small number, I cannot get enough valid Offset values. If I set to a big number like 10,000, I think this function will consume a lot of time