yew1eb opened a new pull request, #3786: URL: https://github.com/apache/celeborn/pull/3786
### What changes were proposed in this pull request? Expose all 10 operations of the already-generated master-side `RatisApi` OpenAPI client (`/api/v1/ratis/*`) as new flags of the `celeborn-cli master` subcommand: - `--ratis-election-transfer` (with `--peer-address`) — transfer the group leader to the specified peer - `--ratis-election-step-down` — make the group leader step down its leadership - `--ratis-election-pause` / `--ratis-election-resume` — pause/resume leader election at the current server - `--ratis-peer-add` / `--ratis-peer-remove` (with `--ratis-peers id|host:port,...`) — add/remove peers in the raft group - `--ratis-peer-set-priority` (with `--peer-priorities host:port=priority,...`) — set the priority of peers - `--ratis-snapshot-create` — trigger the current server to take a snapshot - `--ratis-download-raft-meta-conf <path>` — download the local raft-meta.conf file - `--ratis-generate-new-raft-meta-conf <path>` (with `--ratis-peers`) — generate a new-raft-meta.conf file for moving a raft node to a new node The two file-download flags save the response to the given local path. Invalid peer/priority arguments are rejected client-side with `ParameterException`. No changes to the OpenAPI spec, generated code, or server side are needed. `docs/celeborn_cli.md` is updated with the actual `master -h` output. ### Why are the changes needed? The master REST v1 API exposes 10 Ratis operations and the OpenAPI-generated `RatisApi` client is already shipped, but none of them are exposed in `celeborn-cli`. Operators have to fall back to `curl` or the experimental ratis-shell for routine Ratis maintenance (leader transfer, membership changes, snapshots, raft-meta.conf handling). ### Does this PR resolve a correctness bug? - [ ] Yes ### Does this PR introduce _any_ user-facing change? - [x] Yes — new `celeborn-cli master` flags: `--ratis-election-transfer`, `--ratis-election-step-down`, `--ratis-election-pause`, `--ratis-election-resume`, `--ratis-peer-add`, `--ratis-peer-remove`, `--ratis-peer-set-priority`, `--ratis-snapshot-create`, `--ratis-download-raft-meta-conf`, `--ratis-generate-new-raft-meta-conf`, and common options `--peer-address`, `--ratis-peers`, `--peer-priorities`. ### How was this patch tested? - New argument-validation test cases in `TestCelebornCliCommands`; the full suite passes (52 tests, 0 failures). - Success paths of the ratis endpoints require master HA (ratis) enabled, which the CLI mini-cluster test setup does not enable (same limitation as the existing `--show-masters-info` case), so end-to-end success paths were verified by compilation and manual checks against the generated client signatures. -- 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]
