A set of parameters for GPUdb::adminRebalance. More…
#include <gpudb/protocol/admin_rebalance.h>
Public Member Functions | |
| AdminRebalanceRequest () | |
| Constructs an AdminRebalanceRequest object with default parameters. | |
| AdminRebalanceRequest (const std::map< std::string, std::string > &options_) | |
| Constructs an AdminRebalanceRequest object with the specified parameters. | |
Public Attributes | |
| std::map< std::string, std::string > | options |
| Optional parameters. | |
Detailed Description
A set of parameters for GPUdb::adminRebalance.
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 GPUdb::adminOffline
- If GPUdb::adminRebalance is 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 GPUdb::adminRebalance is 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 GPUdb::createJob.
Definition at line 45 of file admin_rebalance.h.
Constructor & Destructor Documentation
◆ AdminRebalanceRequest() [1/2]
| inline |
Constructs an AdminRebalanceRequest object with default parameters.
Definition at line 50 of file admin_rebalance.h.
◆ AdminRebalanceRequest() [2/2]
| inline |
Constructs an AdminRebalanceRequest object with the specified parameters.
| [in] | options_ | Optional parameters.
|
Definition at line 233 of file admin_rebalance.h.
Member Data Documentation
◆ options
| std::map<std::string, std::string> gpudb::AdminRebalanceRequest::options |
Optional parameters.
- admin_rebalance_rebalance_sharded_data: If true, sharded data will be rebalanced approximately equally across the cluster. Note that for clusters with large amounts of sharded data, this data transfer could be time consuming and result in delayed query responses. Supported values:The default value is admin_rebalance_true.
- admin_rebalance_rebalance_unsharded_data: If true, unsharded data (a.k.a. randomly-sharded) will be rebalanced approximately equally across the cluster. Note that for clusters with large amounts of unsharded data, this data transfer could be time consuming and result in delayed query responses. Supported values:The default value is admin_rebalance_true.
- admin_rebalance_table_includes: Comma-separated list of unsharded table names to rebalance. Not applicable to sharded tables because they are always rebalanced. Cannot be used simultaneously with table_excludes. This parameter is ignored if rebalance_unsharded_data is false.
- admin_rebalance_table_excludes: Comma-separated list of unsharded table names to not rebalance. Not applicable to sharded tables because they are always rebalanced. Cannot be used simultaneously with table_includes. This parameter is ignored if rebalance_unsharded_data is false.
- admin_rebalance_aggressiveness: Influences how much data is moved at a time during rebalance. A higher aggressiveness will complete the rebalance faster. A lower aggressiveness will take longer but allow for better interleaving between the rebalance and other queries. Valid values are constants from 1 (lowest) to 10 (highest). The default value is ‘10’.
- admin_rebalance_compact_after_rebalance: Perform compaction of deleted records once the rebalance completes to reclaim memory and disk space. Default is true, unless repair_incorrectly_sharded_data is set to true. Supported values:The default value is admin_rebalance_true.
- admin_rebalance_compact_only: If set to true, ignore rebalance options and attempt to perform compaction of deleted records to reclaim memory and disk space without rebalancing first. Supported values:The default value is admin_rebalance_false.
- admin_rebalance_repair_incorrectly_sharded_data: Scans for any data sharded incorrectly and re-routes the data to the correct location. Only necessary if GPUdb::adminVerifyDb reports an error in sharding alignment. This can be done as part of a typical rebalance after expanding the cluster or in a standalone fashion when it is believed that data is sharded incorrectly somewhere in the cluster. Compaction will not be performed by default when this is enabled. If this option is set to true, the time necessary to rebalance and the memory used by the rebalance may increase. Supported values:The default value is admin_rebalance_false.
The default value is an empty map.
Definition at line 362 of file admin_rebalance.h.
The documentation for this struct was generated from the following file:
- gpudb/protocol/admin_rebalance.h