[GLUTEN-12468][FLINK] Handle WatermarkStatus elements in GlutenSourceFunction#12461
Open
lgbo-ustc wants to merge 11 commits into
Open
[GLUTEN-12468][FLINK] Handle WatermarkStatus elements in GlutenSourceFunction#12461lgbo-ustc wants to merge 11 commits into
lgbo-ustc wants to merge 11 commits into
Conversation
Add processing for WatermarkStatus elements from native idle detection. When IDLE is received, call sourceContext.markAsTemporarilyIdle() to notify Flink that this source is temporarily idle, allowing watermark progress to continue from other sources.
Adds GlutenSourceFunctionWatermarkStatusTest with 5 test cases covering: - IDLE status triggers markAsTemporarilyIdle() - ACTIVE status is a no-op on SourceContext - IDLE→ACTIVE transition does not call markAsTemporarilyIdle() - Repeated IDLE calls are idempotent - ACTIVE status produces no invocations Uses reflection to invoke private processWatermarkStatus() and a custom TrackingSourceContext spy — no Mockito or native session required.
…bounded test scenarios
…uster - Add GlutenStreamSource.isShouldCallNoMoreSplits() delegating to source - Add GlutenSourceFunction.isShouldCallNoMoreSplits() getter - Extend OffloadedJobGraphGenerator to preserve shouldCallNoMoreSplits when creating a new GlutenSourceFunction during offloading - Rewrite GlutenSourceFunctionWatermarkStatusE2ETest as a real E2E test using embedded Kafka broker + Flink MiniCluster, verifying that WatermarkStatus.IDLE is emitted after idle timeout - Fix EmptyNode output type in WatermarkPushDownSpec project to match table scan schema (avoids FieldNotFound error during plan init)
Covered by GlutenSourceFunctionWatermarkStatusE2ETest which tests the same behavior end-to-end with Kafka + MiniCluster.
Add testIdleInputExcludedFromMinWatermark to GlutenStreamTwoInputWatermarkStatusTest: when one input is marked IDLE, its watermark is excluded from min-watermark calculation so the other active input can advance freely.
3342506 to
9cd1b66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
Add processing for WatermarkStatus elements from native idle detection. When IDLE is received, call sourceContext.markAsTemporarilyIdle() to notify Flink that this source is temporarily idle, allowing watermark progress to continue from other sources.
Related PRs:
closed: #12468
How was this patch tested?
UTs
Was this patch authored or co-authored using generative AI tooling?
Generated-by: deepseek v4 pro