[FLINK] Support native checkpoint#12318
Closed
zhanglistar wants to merge 11 commits into
Closed
Conversation
This reverts commit 67a3ccc.
040c8fc to
dcc5bb5
Compare
Inject barrier into Velox pipeline via injectBarrier(), then synchronously drain task output until the barrier emerges, ensuring all operators have snapshot their state and sinks have flushed before Flink checkpoint proceeds.
…ors" This reverts commit e03c426.
lgbo-ustc
approved these changes
Jul 2, 2026
KevinyhZou
reviewed
Jul 2, 2026
KevinyhZou
left a comment
Contributor
There was a problem hiding this comment.
maybe we should develop a new TaskMetricsHandler to deal with all task metrics, such as bytesIn, bytesOut, recordsOut, recordsIn, and all operator can use this handler.
| @@ -33,31 +38,113 @@ public class SourceTaskMetrics { | |||
| private final long metricUpdateInterval = 2000; | |||
| private Counter sourceNumRecordsOut; | |||
| private Counter sourceNumBytesOut; | |||
Contributor
There was a problem hiding this comment.
sourceNumRecordsOut,sourceNumBytesOut seems redundant as we introduce taskNumRecordsOut, taskNumBytesOut, and we should remove these two.
This was referenced Jul 8, 2026
Contributor
|
close this pr, as #12490 was merged. |
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?
This PR wires native source checkpoint state through Gluten Flink and fixes task-level output metrics for Gluten streaming operators. Depends on bigo-sg/velox#47 and bigo-sg/velox4j#37.
Add Gluten source checkpoint state persistence through Flink operator ListState.
Pass real Flink checkpoint IDs into native snapshot/complete/abort paths.
Restore native checkpoint records during source initialization.
Add native source metrics fallback for unique TableScan stats when Flink operator ID does not match the Velox plan node ID.
Fix Gluten one-input and two-input operators to update task-level numRecordsOut based on the actual number of emitted rows.
Change VectorOutputBridge.collect() to return emitted record count so task metrics reflect row output accurately.
Why
Kafka source checkpointing needs native progress snapshots to be persisted by Flink and restored on failover. Also, Kafka -> Gluten calc -> blackhole jobs previously showed vertex-level write-records = 0 even when Gluten operator metrics were non-zero, because task-level output counters were not updated by the Gluten output path.
How was this patch tested?
Validation
Ran local Flink 1.19.2 Kafka Checkpoint E2E Smoke Test:
I verified the Gluten Flink -> velox4j -> bigo-velox Kafka source checkpoint path with a local Flink standalone cluster.
Test setup:
Test steps:
Verified the job stayed RUNNING.
Verified checkpoints completed successfully.
Verified Kafka committed offset advanced to 5.
Verified a new checkpoint completed successfully.
Verified Kafka committed offset advanced to 8.
Observed results:
Was this patch authored or co-authored using generative AI tooling?
co work with codex.