You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
@Test
public void should_not_fire_window_yet() {
DataStream<String> testStream = createTimedTestStreamWith("message1")
.emit("message2")
.close()
.timeWindowAll(Time.days(1))
.reduce((a, b) -> a + b);
assertStream(testStream, emptyIterableOf(String.class));
}```
This test fails because it outputs the message "message1message2", even though the window is set to 1 day and normally it should not fire until 24 pass.
Adding some break lines seems to indicate a watermark with timestamp Long.MAX_VALUE is being send, which causes the window the fire.
Is there anyway to to alter this behavior? I'd like the have tests that don't automatically 'fire' the window at the end.
The text was updated successfully, but these errors were encountered:
I have tried implementing this feature. In fact it should be the default behaviour that no max timestamp should be emitted. There is a flushOpenWindowsOnTermination() method which enables the emit of a Long.MAX_VALUE.
But if I remember correctly the engine itself seems to emit a max watermark. I have to debug this myself and get back to you.
The framework will emit a max watermark if the source has not been cancelled. Which is the case here because the source just runs out of input and stops. There seems to be no way to stop the framework from emitting the watermark. The only solution would be to block the source and then notify some listener outside of the framework to cancel the job/cluster (which seems a little bit over engineered).
I think I have to discuss this with the Flink guys.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a test similar like this one:
The text was updated successfully, but these errors were encountered: