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.
I have a GlobalWindow with a custom trigger (I leave windows open for a few seconds after I have enough data to close the window).
When I emit data into my data stream, the flink execution environment appears to halt after the test data is exhausted but before my GlobalWidow is triggered.
I tried changing my trigger to wait zero seconds on window full, but that just appears to have made my test racy where sometimes the global window triggers and calls apply (so the test passes) and sometimes the environment appears to halt first.
Is there a way for me to leave the execution environment running for a few seconds after all of my data is emitted? Or is there a good way for me to test this? So far my only solution has been to stop using flink-spector, swap to using env.fromCollection() in flink, and then pass a custom iterator where the iterator itself hangs before delivering the last value Thread.sleep(10_000) and then the last value is also untested. That gives the window a chance to trigger and I always get the correct results (huzzah) but it's both hacky and stops me from leveraging flink-spector.
Any advice here is greatly appreciated. Thanks.
The text was updated successfully, but these errors were encountered:
You've probably have some form of processing-time logic in your customer trigger. Which means you've encountered this issue #29. There's a pretty lengthy statement in there why I don't wan't to work with sleeps. But there has been some development on Flink which should make it possible to manipulate processing time in the future.
You can find test harnesses for almost everything in flink. Flinkspector can then be used to make lightweight integration tests to see if your pipeline works in a distributed fashion.
I have a GlobalWindow with a custom trigger (I leave windows open for a few seconds after I have enough data to close the window).
When I emit data into my data stream, the flink execution environment appears to halt after the test data is exhausted but before my GlobalWidow is triggered.
I tried changing my trigger to wait zero seconds on window full, but that just appears to have made my test racy where sometimes the global window triggers and calls apply (so the test passes) and sometimes the environment appears to halt first.
Is there a way for me to leave the execution environment running for a few seconds after all of my data is emitted? Or is there a good way for me to test this? So far my only solution has been to stop using flink-spector, swap to using
env.fromCollection()
in flink, and then pass a custom iterator where the iterator itself hangs before delivering the last valueThread.sleep(10_000)
and then the last value is also untested. That gives the window a chance to trigger and I always get the correct results (huzzah) but it's both hacky and stops me from leveraging flink-spector.Any advice here is greatly appreciated. Thanks.
The text was updated successfully, but these errors were encountered: