pub async fn admin_rebalance( &self, ) -> Result<AdminRebalanceResponse, KineticaError>
Rebalance data and/or shards across all nodes in a cluster
Rebalance the data in the cluster so that all nodes contain an equal number of records approximately and/or rebalance the shards to be equally distributed (as much as possible) across all the ranks.
The database must be offline for this operation, see /admin/offline
- If
/admin/rebalanceis invoked after a change is made to the cluster, e.g., a host was added or removed, sharded data will be evenly redistributed across the cluster by number of shards per rank while unsharded data will be redistributed across the cluster by data size per rank - If
/admin/rebalanceis invoked at some point when unsharded data (a.k.a. randomly-sharded) in the cluster is unevenly distributed over time, sharded data will not move while unsharded data will be redistributed across the cluster by data size per rank
NOTE: Replicated data will not move as a result of this call
This endpoint’s processing time depends on the amount of data in the system, thus the API call may time out if run directly. It is recommended to run this endpoint asynchronously via /create/job.
pub async fn admin_rebalance_with_opts( &self, options: AdminRebalanceRequestOptions, ) -> Result<AdminRebalanceResponse, KineticaError>
Rebalance data and/or shards across all nodes in a cluster
Rebalance the data in the cluster so that all nodes contain an equal number of records approximately and/or rebalance the shards to be equally distributed (as much as possible) across all the ranks.
The database must be offline for this operation, see /admin/offline
- If
/admin/rebalanceis invoked after a change is made to the cluster, e.g., a host was added or removed, sharded data will be evenly redistributed across the cluster by number of shards per rank while unsharded data will be redistributed across the cluster by data size per rank - If
/admin/rebalanceis invoked at some point when unsharded data (a.k.a. randomly-sharded) in the cluster is unevenly distributed over time, sharded data will not move while unsharded data will be redistributed across the cluster by data size per rank
NOTE: Replicated data will not move as a result of this call
This endpoint’s processing time depends on the amount of data in the system, thus the API call may time out if run directly. It is recommended to run this endpoint asynchronously via /create/job.
options- The optional parameters; any left unset take the server’s defaults.
pub async fn admin_rebalance_raw( &self, request: &AdminRebalanceRequest, ) -> Result<AdminRebalanceResponse, KineticaError>
Sends a pre-built AdminRebalanceRequest to the /admin/rebalance endpoint.
pub async fn admin_rebalance_from_url( &self, url: &str, request: &AdminRebalanceRequest, ) -> Result<AdminRebalanceResponse, KineticaError>
Sends a pre-built AdminRebalanceRequest to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.