Class AdminRebalanceRequest
- java.lang.Object
-
- com.gpudb.protocol.AdminRebalanceRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class AdminRebalanceRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.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.adminRebalanceis 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.adminRebalanceis 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 rankNOTE: 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdminRebalanceRequest.OptionsA set of string constants for theAdminRebalanceRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description AdminRebalanceRequest()Constructs an AdminRebalanceRequest object with default parameters.AdminRebalanceRequest(Map<String,String> options)Constructs an AdminRebalanceRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AdminRebalanceRequestsetOptions(Map<String,String> options)Optional parameters.StringtoString()
-
-
-
Constructor Detail
-
AdminRebalanceRequest
public AdminRebalanceRequest()
Constructs an AdminRebalanceRequest object with default parameters.
-
AdminRebalanceRequest
public AdminRebalanceRequest(Map<String,String> options)
Constructs an AdminRebalanceRequest object with the specified parameters.- Parameters:
options- Optional parameters.REBALANCE_SHARDED_DATA: IfTRUE, 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 isTRUE.REBALANCE_UNSHARDED_DATA: IfTRUE, 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 isTRUE.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 withTABLE_EXCLUDES. This parameter is ignored ifREBALANCE_UNSHARDED_DATAisFALSE.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 withTABLE_INCLUDES. This parameter is ignored ifREBALANCE_UNSHARDED_DATAisFALSE.AGGRESSIVENESS: Influences how much data is moved at a time during rebalance. A higherAGGRESSIVENESSwill complete the rebalance faster. A lowerAGGRESSIVENESSwill 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'.COMPACT_AFTER_REBALANCE: Perform compaction of deleted records once the rebalance completes to reclaim memory and disk space. Default isTRUE, unlessREPAIR_INCORRECTLY_SHARDED_DATAis set toTRUE. Supported values: The default value isTRUE.COMPACT_ONLY: If set toTRUE, 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 isFALSE.REPAIR_INCORRECTLY_SHARDED_DATA: Scans for any data sharded incorrectly and re-routes the data to the correct location. Only necessary ifGPUdb.adminVerifyDbreports 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 toTRUE, the time necessary to rebalance and the memory used by the rebalance may increase. Supported values: The default value isFALSE.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.REBALANCE_SHARDED_DATA: IfTRUE, 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 isTRUE.REBALANCE_UNSHARDED_DATA: IfTRUE, 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 isTRUE.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 withTABLE_EXCLUDES. This parameter is ignored ifREBALANCE_UNSHARDED_DATAisFALSE.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 withTABLE_INCLUDES. This parameter is ignored ifREBALANCE_UNSHARDED_DATAisFALSE.AGGRESSIVENESS: Influences how much data is moved at a time during rebalance. A higherAGGRESSIVENESSwill complete the rebalance faster. A lowerAGGRESSIVENESSwill 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'.COMPACT_AFTER_REBALANCE: Perform compaction of deleted records once the rebalance completes to reclaim memory and disk space. Default isTRUE, unlessREPAIR_INCORRECTLY_SHARDED_DATAis set toTRUE. Supported values: The default value isTRUE.COMPACT_ONLY: If set toTRUE, 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 isFALSE.REPAIR_INCORRECTLY_SHARDED_DATA: Scans for any data sharded incorrectly and re-routes the data to the correct location. Only necessary ifGPUdb.adminVerifyDbreports 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 toTRUE, the time necessary to rebalance and the memory used by the rebalance may increase. Supported values: The default value isFALSE.
Map.- Returns:
- The current value of
options.
-
setOptions
public AdminRebalanceRequest setOptions(Map<String,String> options)
Optional parameters.REBALANCE_SHARDED_DATA: IfTRUE, 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 isTRUE.REBALANCE_UNSHARDED_DATA: IfTRUE, 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 isTRUE.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 withTABLE_EXCLUDES. This parameter is ignored ifREBALANCE_UNSHARDED_DATAisFALSE.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 withTABLE_INCLUDES. This parameter is ignored ifREBALANCE_UNSHARDED_DATAisFALSE.AGGRESSIVENESS: Influences how much data is moved at a time during rebalance. A higherAGGRESSIVENESSwill complete the rebalance faster. A lowerAGGRESSIVENESSwill 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'.COMPACT_AFTER_REBALANCE: Perform compaction of deleted records once the rebalance completes to reclaim memory and disk space. Default isTRUE, unlessREPAIR_INCORRECTLY_SHARDED_DATAis set toTRUE. Supported values: The default value isTRUE.COMPACT_ONLY: If set toTRUE, 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 isFALSE.REPAIR_INCORRECTLY_SHARDED_DATA: Scans for any data sharded incorrectly and re-routes the data to the correct location. Only necessary ifGPUdb.adminVerifyDbreports 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 toTRUE, the time necessary to rebalance and the memory used by the rebalance may increase. Supported values: The default value isFALSE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-