[FLINK-38825] Add time-based batch triggering for AsyncBatchWaitOperator #27356
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.
[FLINK-38825] Introduce AsyncBatchFunction and AsyncBatchWaitOperator (initial API & size-based batching)
Motivation
Many AI / ML inference and external service workloads benefit significantly from batching rather than per-record async invocation. Typical examples include:
While Flink currently provides
AsyncFunctionandAsyncWaitOperatorfor record-level async I/O, there is no native abstraction for batch-oriented async processing in the DataStream API.This PR introduces a minimal and extensible foundation for async batch processing in Flink.
What is included in this PR
This PR intentionally focuses on a small, additive, and reviewer-friendly first step:
New public API
AsyncBatchFunction<IN, OUT>(annotated with@PublicEvolving)New runtime operator
AsyncBatchWaitOperatorwith unordered semanticsStream API entry point
AsyncDataStream.unorderedWaitBatch(...)Unit tests
What is intentionally NOT included
To keep this PR minimal and avoid premature design constraints, the following are explicitly out of scope and will be addressed in follow-up PRs:
Design notes
Follow-up work
Planned follow-up PRs (tracked under FLINK-38825) include:
Checklist
@PublicEvolvingThis PR establishes the minimal building block for async batch processing in Flink and enables iterative enhancement without locking in premature design decisions.