8000 windowStateTable not working properly · Issue #24 · jpzk/mockedstreams · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
windowStateTable not working properly #24
Open
@yj-1plusx

Description

@yj-1plusx

Hi, thanks for the great library!

One problem I encountered was when I tried to test a TumblingWindow aggregation.
Let's say I create a 2 second tumbling window like so:
val w = TimeWindows .of(TimeUnit.SECONDS.toMillis(2)) .advanceBy(TimeUnit.SECONDS.toMillis(2)) .until(TimeUnit.SECONDS.toMillis(2))

Now, I use the CustomTimestampExtractor and send in events with value "number@timestamp", e.g.
("a", "1@1000"), ("a", "1@1500"), ("a", "1@2000"), ("a", "1@10000"), ("a", "1@100")
I run a simple count aggregation and would expect count to be (0->2), (2000->1), (10000->1), because the last event arrives when the time window [0,2000) is already closed because of until(2000). However, the last event is accounted for.
Could this be an interpretation, that the until duration is understood as a lower bound?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0