Skip to content

Add a new API GET /tenants/{tenantName}/rebalanceJobs#16376

Merged
somandal merged 2 commits intoapache:masterfrom
J-HowHuang:tenant-rebalance-job-api
Jul 18, 2025
Merged

Add a new API GET /tenants/{tenantName}/rebalanceJobs#16376
somandal merged 2 commits intoapache:masterfrom
J-HowHuang:tenant-rebalance-job-api

Conversation

@J-HowHuang
Copy link
Copy Markdown
Collaborator

Purpose

This API allows inquiries of all ongoing and historical tenant rebalance jobs for a given tenant.

Usage

Request:

GET /tenants/<tenant_name>/rebalanceJobs

Response:
A map of all tenant rebalance job ID to their job metadata, as of the metadata in /CONTROLLER_JOBS/TENANT_REBALANCE in ZK, whose tenantName is <tenant_name>

Example

curl -X 'GET' \
  'http://localhost:9000/tenants/DefaultTenant/rebalanceJobs' \
  -H 'accept: application/json'
{
  "40160692-2bac-4d1c-a175-d485438e831a": {
    "jobId": "40160692-2bac-4d1c-a175-d485438e831a",
    "tenantName": "DefaultTenant",
    "submissionTimeMs": "1752779583413",
    "jobType": "TENANT_REBALANCE",
    "REBALANCE_PROGRESS_STATS": "{\"startTimeMs\":1752779576600,\"completionStatusMsg\":\"Successfully rebalanced tenant DefaultTenant.\",\"tableStatusMap\":{\"meetupRsvpJson_REALTIME\":\"PROCESSED\",\"meetupRsvp_REALTIME\":\"PROCESSED\",\"upsertMeetupRsvp_REALTIME\":\"Table is already balanced\",\"githubEvents_REALTIME\":\"PROCESSED\",\"upsertPartialMeetupRsvp_REALTIME\":\"Table is already balanced\",\"upsertJsonMeetupRsvp_REALTIME\":\"Table is already balanced\",\"fineFoodReviews_REALTIME\":\"Table is already balanced\",\"dailySales_REALTIME\":\"PROCESSED\",\"meetupRsvpComplexType_REALTIME\":\"PROCESSED\",\"airlineStats_REALTIME\":\"PROCESSED\"},\"totalTables\":10,\"remainingTables\":0,\"tableRebalanceJobIdMap\":{\"meetupRsvpJson_REALTIME\":\"5f382d3c-b8a1-4581-8007-d4ba93358069\",\"meetupRsvp_REALTIME\":\"6a80fa42-2a6f-40a8-bae4-6aa6c503beaa\",\"upsertMeetupRsvp_REALTIME\":\"915427a6-29ed-4657-aa62-71aad5fd9703\",\"githubEvents_REALTIME\":\"e98012e1-2d1e-4af3-a47f-feb95f8d8b13\",\"upsertPartialMeetupRsvp_REALTIME\":\"8377867e-9601-456a-b521-e2c55fff73ac\",\"upsertJsonMeetupRsvp_REALTIME\":\"6a5b46fb-0973-49ef-8615-8f6874e09037\",\"fineFoodReviews_REALTIME\":\"b74f1e73-33c6-428a-92a7-52c3d6ed7c5c\",\"dailySales_REALTIME\":\"9f5483f5-ffb8-4952-ab39-46b717c6aaff\",\"meetupRsvpComplexType_REALTIME\":\"e4ad9865-c175-47b4-aacb-851e89d9603b\",\"airlineStats_REALTIME\":\"6669ed57-6b7c-45c4-b7d4-0b4c837bc045\"},\"timeToFinishInSeconds\":6}"
  }
}

Copy link
Copy Markdown
Contributor

@somandal somandal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks for adding this!

@somandal somandal merged commit 39cdeec into apache:master Jul 18, 2025
35 of 36 checks passed
@Jackie-Jiang Jackie-Jiang added the rest-api Related to REST API endpoints label Jul 23, 2025
@xiangfu0 xiangfu0 added enhancement Improvement to existing functionality json Related to JSON column support multi-tenant Related to multi-tenancy features segment-rebalance Related to segment rebalancing across servers labels Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality json Related to JSON column support multi-tenant Related to multi-tenancy features rest-api Related to REST API endpoints segment-rebalance Related to segment rebalancing across servers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants