celeborn/openapi/openapi-client
Wang, Fei 568e335ada [CELEBORN-1630] Support to apply ratis peer operation with RESTful api
### What changes were proposed in this pull request?

Sub task of CELEBORN-1628.

Mapping for below commands:
```
$ celeborn-ratis sh peer add -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> [-groupid <RAFT_GROUP_ID>] -address <P4_HOST:P4_PORT,...,PN_HOST:PN_PORT>
```

```
$ celeborn-ratis sh peer remove -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> [-groupid <RAFT_GROUP_ID>] -address <P0_HOST:P0_PORT,...>
```

```
$ celeborn-ratis sh peer setPriority -peers <P0_HOST:P0_PORT,P1_HOST:P1_PORT,P2_HOST:P2_PORT> [-groupid <RAFT_GROUP_ID>] -addressPriority <P0_HOST:P0_PORT|PRIORITY>
```

### Why are the changes needed?

It is more convenient to apply the ratis operation with RESTful api.

### Does this PR introduce _any_ user-facing change?
No, new api.

### How was this patch tested?
Integration testing. Will provide the screenshot

Add:
<img width="1619" alt="image" src="https://github.com/user-attachments/assets/ab4e24bb-3a99-40da-9972-231c9dc7c46c">

Remove:
<img width="1654" alt="image" src="https://github.com/user-attachments/assets/71133818-3259-47f5-be75-0715efe97361">

Set peer priority:
<img width="1510" alt="image" src="https://github.com/user-attachments/assets/e31b3701-71c1-46fd-872b-5227fb89f6fe">

Closes #2804 from turboFei/peer_raft.

Authored-by: Wang, Fei <fwang12@ebay.com>
Signed-off-by: Shuang <lvshuang.xjs@alibaba-inc.com>
2024-10-17 11:01:12 +08:00
..
src/main [CELEBORN-1630] Support to apply ratis peer operation with RESTful api 2024-10-17 11:01:12 +08:00
pom.xml [CELEBORN-1607] Enable useEnumCaseInsensitive for openapi-generator 2024-09-23 20:43:04 +08:00
README.md [CELEBORN-1477] Using openapi-generator apache-httpclient library instead of jersey2 2024-07-31 15:02:41 +08:00

Celeborn OpenAPI Client

To update the OpenAPI specification

  • just update the specification under openapi/openapi-client/src/main/openapi3/ and keep the schema definitions consistent between master and worker.
  • Install JDK 11 or above by whatever mechanism is appropriate for your system, and set that version to be the default Java version (e.g., by setting env variable JAVA_HOME)
  • run the following:
    build/mvn -pl openapi/openapi-client clean package -Pgenerate
    
    or
    build/sbt "clean;celeborn-openapi-client/generate"
    
    This will regenerate the OpenAPI data models + APIs in the celeborn-openapi-client SDK.