[CELEBORN-2394] Add REST v1 API to unregister shuffles - #3770
Closed
Kalvin2077 wants to merge 4 commits into
Closed
Conversation
Signed-off-by: Kalvin2077 <wk.huang2077@outlook.com>
Signed-off-by: Kalvin2077 <wk.huang2077@outlook.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3770 +/- ##
============================================
+ Coverage 58.05% 58.24% +0.19%
- Complexity 228 229 +1
============================================
Files 397 399 +2
Lines 27931 28048 +117
Branches 2725 2738 +13
============================================
+ Hits 16212 16333 +121
+ Misses 10530 10517 -13
- Partials 1189 1198 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
@Kalvin2077, please support adding corresponding options in celeborn shell for unregistering shuffle. |
Contributor
Author
|
RexXiong
approved these changes
Jul 30, 2026
SteNicholas
requested changes
Aug 3, 2026
SteNicholas
pushed a commit
that referenced
this pull request
Aug 3, 2026
### What changes were proposed in this pull request?
- Add an OpenAPI-based `POST /api/v1/shuffles/unregister` endpoint that unregisters multiple shuffles for an application in one request.
- Generate Java client support for `ShuffleApi.unregisterShuffles` and `UnregisterShufflesRequest` from the updated OpenAPI specification.
- Use the existing batch unregister RPC when handling the REST request.
- Add `--unregister-shuffles` support to Celeborn Shell, reusing the existing `--apps` and `--shuffleIds` options.
- Fix the legacy application resource test to deserialize `ApplicationsHeartbeatResponse` instead of `ApplicationsResponse`.
### Why are the changes needed?
Shuffle unregistration was previously available only through Celeborn's internal RPC path. REST API, generated Java client, and Celeborn Shell users had no corresponding administrative operation.
Supporting multiple shuffle IDs in one request also avoids requiring callers to issue one request per shuffle and aligns the public interfaces with Celeborn's existing batch unregister RPC.
### Does this PR resolve a correctness bug?
- [ ] Yes
### Does this PR introduce _any_ user-facing change?
- [x] Yes
Users can unregister multiple shuffles through the REST v1 API, the generated OpenAPI Java client, or Celeborn Shell.
REST request example:
```http
POST /api/v1/shuffles/unregister
Content-Type: application/json
{
"appId": "app1",
"shuffleIds": [1, 2, 3]
}
```
Celeborn Shell example:
```shell
celeborn-cli master --unregister-shuffles --apps app1 --shuffleIds 1,2,3
```
### How was this patch tested?
- Added two tests in `ApiV1MasterResourceSuite` covering batch unregistration, preservation of unrelated shuffles, idempotency, and invalid requests.
- Extended `ApiV1OpenapiClientSuite` to cover batch unregistration through the generated Java client.
- Added Celeborn Shell integration coverage for successful batch unregistration, missing options, multiple application IDs, malformed shuffle IDs, and negative shuffle IDs.
- Verified the generated Java sources with:
```shell
mvn -pl openapi/openapi-client -Pgenerate generate-resources -DskipTests
```
- Ran the affected test suites with Maven. The Master REST suite passed 9 tests, the OpenAPI client suite passed 11 tests, and the CLI suite passed 43 tests with one pre-existing HA test canceled.
- Verified formatting with:
```shell
mvn spotless:check -pl cli -am -DskipTests
```
Closes #3770 from Kalvin2077/feat/unregister-shuffle.
Authored-by: Kalvin2077 <wk.huang2077@outlook.com>
Signed-off-by: Nicholas Jiang <programgeek@163.com>
Member
|
Thanks. Merged to main(v1.0.0) and branch-0.7(v0.7.0). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
POST /api/v1/shuffles/unregisterendpoint that unregisters multiple shuffles for an application in one request.ShuffleApi.unregisterShufflesandUnregisterShufflesRequestfrom the updated OpenAPI specification.--unregister-shufflessupport to Celeborn Shell, reusing the existing--appsand--shuffleIdsoptions.ApplicationsHeartbeatResponseinstead ofApplicationsResponse.Why are the changes needed?
Shuffle unregistration was previously available only through Celeborn's internal RPC path. REST API, generated Java client, and Celeborn Shell users had no corresponding administrative operation.
Supporting multiple shuffle IDs in one request also avoids requiring callers to issue one request per shuffle and aligns the public interfaces with Celeborn's existing batch unregister RPC.
Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
Users can unregister multiple shuffles through the REST v1 API, the generated OpenAPI Java client, or Celeborn Shell.
REST request example:
Celeborn Shell example:
How was this patch tested?
Added two tests in
ApiV1MasterResourceSuitecovering batch unregistration, preservation of unrelated shuffles, idempotency, and invalid requests.Extended
ApiV1OpenapiClientSuiteto cover batch unregistration through the generated Java client.Added Celeborn Shell integration coverage for successful batch unregistration, missing options, multiple application IDs, malformed shuffle IDs, and negative shuffle IDs.
Verified the generated Java sources with:
Ran the affected test suites with Maven. The Master REST suite passed 9 tests, the OpenAPI client suite passed 11 tests, and the CLI suite passed 43 tests with one pre-existing HA test canceled.
Verified formatting with: