Jackeyzhe opened a new pull request, #29012:
URL: https://github.com/apache/flink/pull/29012

   ## 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>&regex=<regex>`
   - 
`/jobs/:jobid/vertices/subtasks/metrics/values?vertices=<vertexIds>&get=<metrics>&agg=<aggregations>`
   
   The metric name `regex` parameter uses full Java regex matching, consistent 
with
   the API-shape discussion on FLINK-39617.
   
   ## Brief change log
   
   - Added batch aggregated subtask metric name and value REST headers, 
parameters,
     response body, and handlers.
   - Moved shared metric-store aggregation logic into
     `AggregatedMetricsStoreHelper` so both existing and batch handlers can 
reuse
     the same aggregation behavior.
   - Registered the new batch metric handlers in `WebMonitorEndpoint`.
   - Added focused tests for query parameter parsing, response marshalling,
     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
 test`
   
   The 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:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? REST API documentation is 
generated from the REST message headers and parameters added in this change.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: OpenAI Codex (GPT-5)
   The changes were reviewed by a human, and I am responsible for the code 
quality.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to