yunfengzhou-hub opened a new pull request, #30266: URL: https://github.com/apache/flink/pull/30266
## What is the purpose of the change Implement FLIP-617 so external clients can send JSON requests to an operator coordinator in a running Flink job. The endpoint addresses the coordinator by job ID and operator UID. The coordinator defines the request and response schemas. [FLINK-41823](https://issues.apache.org/jira/browse/FLINK-41823) · [FLIP-617](https://cwiki.apache.org/confluence/spaces/FLINK/pages/451979787/FLIP-617+Add+a+Public+REST+Endpoint+for+Operator+Coordinator+Requests) ## Brief change log - Add `POST /jobs/:jobid/coordinators/:operatorUid/external` and forward requests through the existing coordination RPC. - Validate the request and response as single JSON values and preserve their original text. Normalize empty or whitespace-only requests to `{}` and responses to `null`. - Fix shared REST path decoding so an encoded slash in an operator UID stays within its path segment. - Return HTTP 404 when the addressed coordinator cannot handle the request. This also changes three error paths on the internal coordination endpoint from 500 to 404, covering coordinators without a request handler and unsupported requests to the collect and dynamic filtering coordinators. ## Verifying this change - `ExternalCoordinationITCase` exercises the endpoint over HTTP against a MiniCluster. It covers JSON text preservation, encoded operator UIDs on both coordination routes, empty bodies, malformed payloads, size limits, coordinator errors, and timeouts. - The coordinator, REST routing, and multipart upload regression tests passed locally. - `RuntimeOpenRestAPIDocsCompletenessITCase` and `RuntimeRestAPIStabilityTest` passed locally. ## Does this pull request potentially affect one of the following parts: - Dependencies — No. - Public API — Yes, this adds a public REST endpoint. The new Java message types are `@Internal`. - Serializers — No. - Runtime per-record code paths — No. - Deployment or recovery — No. The JobManager changes are limited to REST handling and coordinator request dispatch. - S3 file system connector — No. ## Documentation - Does this pull request introduce a new feature? Yes. - How is it documented? The generated REST API reference and OpenAPI specification describe the endpoint. FLIP-617 specifies the HTTP contract. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes (please specify the tool below) Generated-by: Codex 0.171.0-alpha.13.2 (gpt-6.2-sol) -- 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]
