shounakmk219 opened a new pull request, #11128: URL: https://github.com/apache/pinot/pull/11128
### Tenant Rebalance API This API addresses the task to rebalance all the tables for a given tenant. Usually when we tag new servers to a tenant it gets tedious to rebalance each table under that tenant to utilise the newly added servers. This operation becomes impossible to handle if the tenant has high number of tables. The proposed utility will allow users to rebalance a tenant and track its progress with minimal operational overhead. More details are captured in this doc : [Tenant Rebalance](https://docs.google.com/document/d/1s00wFOq2Ox9V8sOUhbWX2VjGkmb9s0IsRgGjpW_O6mE/edit?usp=sharing) Path : `/tenants/{tenantName}/rebalance` Method : `POST` Sample request body : ``` { "tenantName": "DefaultTenant", "degreeOfParallelism": 2, "parallelWhitelist": [ "airlineStats_OFFLINE" ], "parallelBlacklist": [ "airlineStats_REALTIME" ], "verboseResult": false, "dryRun": false, "downtime": false, "reassignInstances": false, "includeConsuming": false, "bootstrap": false, "minAvailableReplicas": 1, "bestEfforts": false, "updateTargetTier": false, "externalViewCheckIntervalInMs": 1000, "externalViewStabilizationTimeoutInMs": 3600000 } ``` Sample response : ``` { "jobId": "dfbbebb7-1f62-497d-82a7-ded6e0d855e1", "rebalanceTableResults": { "airlineStats_OFFLINE": { "jobId": "2d4dc2da-1071-42b5-a20c-ac38a6d53fc4", "status": "NO_OP", "description": "Table is already balanced" }, "airlineStats_REALTIME": { "jobId": "9284f137-29c1-4c5a-a113-17b90a484403", "status": "NO_OP", "description": "Table is already balanced" } } } ``` ### Tenant Rebalance Status tracking API Path : `/tenants/rebalanceStatus/{jobId}` Method : `GET` Sample response body : ``` { "tenantRebalanceProgressStats": { "startTimeMs": 1689679866904, "timeToFinishInSeconds": 0, "completionStatusMsg": "Successfully rebalanced tenant DefaultTenant.", "tableStatusMap": { "airlineStats_OFFLINE": "Table is already balanced", "airlineStats_REALTIME": "Table is already balanced" }, "totalTables": 2, "remainingTables": 0, "tableRebalanceJobIdMap": { "airlineStats_OFFLINE": "2d4dc2da-1071-42b5-a20c-ac38a6d53fc4", "airlineStats_REALTIME": "9284f137-29c1-4c5a-a113-17b90a484403" } }, "timeElapsedSinceStartInSeconds": 0 } ``` -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org