featzhang commented on PR #27774:
URL: https://github.com/apache/flink/pull/27774#issuecomment-4362700659
Follow-up: addressed **M2** from the self-review by making `topN`
configurable
(commit `8185139806`).
**New contract**
- `GET /jobs/:jobid/metrics/top-n?topN=N` — optional integer query parameter
- Valid range: `1..100` (inclusive). Out-of-range / non-integer values
produce
a `ConversionException` that REST translates into `400 Bad Request`.
- When omitted the handler keeps the original default of `5`, so existing
clients are unaffected.
**Docs** — REST API docs regenerated (`rest_v1_dispatcher.html` and
`rest_v1_dispatcher.yml` show the new parameter). No wire-protocol change
for existing clients.
**Tests** — `./mvnw -pl flink-runtime test` on both classes:
```
Tests run: 15, Failures: 0, Errors: 0, Skipped: 0
```
- `TopNQueryParameterTest` — 5 tests covering valid values, non-integer,
`<= 0`, `> MAX_TOP_N`, and round-trip conversion.
- `TopNMetricsHandlerTest` — 2 new tests covering `?topN=3` and the
no-parameter default.
Remaining items from the self-review are all Minor (field naming, unrelated
formatting, etc.). Happy to batch them once reviewers weigh in.
--
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]