kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guozhang Wang <wangg...@gmail.com>
Subject Re: Streams SessionStore - bug or documentation error?
Date Wed, 17 Oct 2018 15:31:15 GMT

I think there is a documentation error on the `findSessions` function,
where the last parameter should really be "the start timestamp of the
latest session to search for".

So back to your example, if you want to find "any sessions that has an
overlap of [T2, T4)" you should be calling `findSessions(K1, T4, T2)`
instead, i.e. the second parameter should be larger than the third,
otherwise there is no "range" to search for.

I will go ahead and update the java doc accordingly.


On Tue, Oct 16, 2018 at 8:13 AM Guozhang Wang <wangguoz@gmail.com> wrote:

> Hello Tom,
> Thanks for reporting the observed issue. I've looked into the source code
> and I agree with you that there is indeed a mistake interpreting the
> parameters.
> I'll file a JIRA to keep track, and fix it asap.
> Guozhang
> On Fri, Oct 12, 2018 at 10:06 AM Thomas Becker <Thomas.Becker@tivo.com>
> wrote:
>> I've been experimenting with the streams SessionStore and found some
>> behavior that contradicts the javadoc. Specifically: I have a SessionStore,
>> and put() a session with key K1 and session of time T0-T5. I then call
>> findSessions("K1", T2, T4) and it comes back empty. I would expect the
>> session to be returned since, according to the documentation that call
>> fetches "any sessions with the matching key and the sessions end is >=
>> earliestSessionEndTime and the sessions start is <= latestSessionStartTime"
>> and obviously T5 >= T2 and T0 <= T4. From the behavior I see, the third
>> parameter to this method should be called "latestSession*End*Time". That
>> is, the method returns all sessions that end within the range given. Any
>> thoughts?
>> ________________________________
>> This email and any attachments may contain confidential and privileged
>> material for the sole use of the intended recipient. Any review, copying,
>> or distribution of this email (or any attachments) by others is prohibited.
>> If you are not the intended recipient, please contact the sender
>> immediately and permanently delete this email and any attachments. No
>> employee or agent of TiVo Inc. is authorized to conclude any binding
>> agreement on behalf of TiVo Inc. by email. Binding agreements with TiVo
>> Inc. may only be made by a signed written agreement.
> --
> -- Guozhang

-- Guozhang

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message