[FLINK-39617] [runtime] Add batch aggregated subtask metrics endpoints - #29012
Open
Jackeyzhe wants to merge 1 commit into
Open
[FLINK-39617] [runtime] Add batch aggregated subtask metrics endpoints#29012Jackeyzhe wants to merge 1 commit into
Jackeyzhe wants to merge 1 commit into
Conversation
Collaborator
Jackeyzhe
force-pushed
the
feature/FLINK-39617-batch-subtask-metrics
branch
from
August 24, 2026 15:48
42f02c4 to
e693747
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 is the purpose of the change
This pull request adds batch REST endpoints for retrieving aggregated subtask
metrics across multiple job vertices in a single request.
The existing single-vertex endpoint remains unchanged. The new endpoints are
additive GET endpoints and use query parameters instead of request bodies:
/jobs/:jobid/vertices/subtasks/metrics/names?vertices=<vertexIds>®ex=<regex>/jobs/:jobid/vertices/subtasks/metrics/values?vertices=<vertexIds>&get=<metrics>&agg=<aggregations>The metric name
regexparameter uses full Java regex matching, consistent withthe API-shape discussion on FLINK-39617.
Brief change log
response body, and handlers.
AggregatedMetricsStoreHelperso both existing and batch handlers can reusethe same aggregation behavior.
WebMonitorEndpoint.handler behavior, invalid input handling, and REST endpoint registration.
Verifying this change
This change added tests and can be verified as follows:
./mvnw -pl flink-runtime -Dtest=AggregatingSubtasksMetricsHandlerTest,AggregatingSubtasksMetricsBatchHandlerTest,AggregatedSubtaskMetricsBatchParametersTest,AggregatedSubtaskMetricsBatchHeadersTest,AggregatedSubtaskMetricsBatchResponseBodyTest,RuntimeRestAPIVersionTest,WebMonitorEndpointTest testThe command above passed locally with 23 tests, 0 failures, 0 errors, and 0
skipped tests. Checkstyle and Spotless also passed in the same Maven run.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex (GPT-5)
The changes were reviewed by a human, and I am responsible for the code quality.