celeborn/openapi
Wang, Fei ab12b34a1d [CELEBORN-1629] Support to apply ratis election operation with RESTful api
### What changes were proposed in this pull request?

As title, sub task of [CELEBORN-1628](https://issues.apache.org/jira/browse/CELEBORN-1628)
### Why are the changes needed?

It is more friendly for customer experience and necessary for automation integration.

<img width="1325" alt="image" src="https://github.com/user-attachments/assets/b9270bd5-75ee-41a9-b7aa-1db1270b4edb">

Before restart/recreate the celeborn master pod
- call the  ratis/snapshot/create to create the snapshot(will raise another PR for this)
- if need to failover
    - call the ratis/election/pause to pause the election
    - call the ratis/election/step_down or ratis/election/transfer to transfer the leadership
    - call the ratis/election/resume to resume the election finally

### Does this PR introduce _any_ user-facing change?
Introduce new RESTful apis.

### How was this patch tested?

election transfer:
<img width="1614" alt="image" src="https://github.com/user-attachments/assets/42e39478-e6c7-4f8a-91bb-a6b35e2098c5">

election pause and resume:

<img width="727" alt="image" src="https://github.com/user-attachments/assets/5ead4739-d45f-47d4-a951-9784a6495add">

election step down:
<img width="1719" alt="image" src="https://github.com/user-attachments/assets/ebb3b722-147e-4db2-971d-17f4458b98ed">

Closes #2779 from turboFei/ratis_rest.

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: Shuang <lvshuang.xjs@alibaba-inc.com>
2024-10-11 10:24:44 +08:00
..
openapi-client [CELEBORN-1629] Support to apply ratis election operation with RESTful api 2024-10-11 10:24:44 +08:00