public class AdminRebalanceRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.adminRebalance(AdminRebalanceRequest)
.
Rebalance the cluster so that all the nodes contain approximately an equal number of records. The rebalance will also cause the shards to be equally distributed (as much as possible) across all the ranks.
This endpoint may take a long time to run, depending on the amount of data
in the system. The API call may time out if run directly. It is recommended
to run this endpoint asynchronously via GPUdb.createJob(CreateJobRequest)
.
Modifier and Type | Class and Description |
---|---|
static class |
AdminRebalanceRequest.Options
Optional parameters.
|
Constructor and Description |
---|
AdminRebalanceRequest()
Constructs an AdminRebalanceRequest object with default parameters.
|
AdminRebalanceRequest(Map<String,String> options)
Constructs an AdminRebalanceRequest object with the specified
parameters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
AdminRebalanceRequest |
setOptions(Map<String,String> options) |
String |
toString() |
public AdminRebalanceRequest()
public AdminRebalanceRequest(Map<String,String> options)
options
- Optional parameters.
REBALANCE_SHARDED_DATA
: If true
, sharded data
will be rebalanced approximately equally across the
cluster. Note that for big clusters, this data transfer
could be time consuming and result in delayed query
responses.
Supported values:
The default value is TRUE
.
REBALANCE_UNSHARDED_DATA
: If true
, unsharded
data (data without primary keys and without shard keys)
will be rebalanced approximately equally across the
cluster. Note that for big clusters, this data transfer
could be time consuming and result in delayed query
responses.
Supported values:
The default value is TRUE
.
TABLE_WHITELIST
: Comma-separated list of unsharded
table names to rebalance. Not applicable to sharded
tables because they are always balanced in accordance
with their primary key or shard key. Cannot be used
simultaneously with table_blacklist
.
TABLE_BLACKLIST
: Comma-separated list of unsharded
table names to not rebalance. Not applicable to sharded
tables because they are always balanced in accordance
with their primary key or shard key. Cannot be used
simultaneously with table_whitelist
.
AGGRESSIVENESS
: Influences how much data to send per
rebalance round. A higher aggressiveness setting will
complete the rebalance faster. A lower aggressiveness
setting will take longer, but allow for better
interleaving between the rebalance and other queries.
Allowed values are 1 through 10. The default value is
'1'.
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 TRUE
.
COMPACT_ONLY
: Only perform compaction, do not
rebalance. Default is false.
Supported values:
The default value is FALSE
.
REPAIR_INCORRECTLY_SHARDED_DATA
: Scans for any data
sharded incorrectly and re-routes the correct location.
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. This option
may also lengthen rebalance time, and increase the
memory used by the rebalance.
Supported values:
The default value is FALSE
.
Map
.public static org.apache.avro.Schema getClassSchema()
public Map<String,String> getOptions()
REBALANCE_SHARDED_DATA
: If true
, sharded data will be
rebalanced approximately equally across the cluster. Note that
for big clusters, this data transfer could be time consuming and
result in delayed query responses.
Supported values:
The default value is TRUE
.
REBALANCE_UNSHARDED_DATA
: If true
, unsharded data (data
without primary keys and without shard keys) will be rebalanced
approximately equally across the cluster. Note that for big
clusters, this data transfer could be time consuming and result
in delayed query responses.
Supported values:
The default value is TRUE
.
TABLE_WHITELIST
: Comma-separated list of unsharded table names
to rebalance. Not applicable to sharded tables because they are
always balanced in accordance with their primary key or shard
key. Cannot be used simultaneously with table_blacklist
.
TABLE_BLACKLIST
: Comma-separated list of unsharded table names
to not rebalance. Not applicable to sharded tables because they
are always balanced in accordance with their primary key or
shard key. Cannot be used simultaneously with table_whitelist
.
AGGRESSIVENESS
: Influences how much data to send per rebalance
round. A higher aggressiveness setting will complete the
rebalance faster. A lower aggressiveness setting will take
longer, but allow for better interleaving between the rebalance
and other queries. Allowed values are 1 through 10. The default
value is '1'.
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 TRUE
.
COMPACT_ONLY
: Only perform compaction, do not rebalance.
Default is false.
Supported values:
The default value is FALSE
.
REPAIR_INCORRECTLY_SHARDED_DATA
: Scans for any data sharded
incorrectly and re-routes the correct location. 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. This option may also
lengthen rebalance time, and increase the memory used by the
rebalance.
Supported values:
The default value is FALSE
.
Map
.public AdminRebalanceRequest setOptions(Map<String,String> options)
options
- Optional parameters.
REBALANCE_SHARDED_DATA
: If true
, sharded data
will be rebalanced approximately equally across the
cluster. Note that for big clusters, this data transfer
could be time consuming and result in delayed query
responses.
Supported values:
The default value is TRUE
.
REBALANCE_UNSHARDED_DATA
: If true
, unsharded
data (data without primary keys and without shard keys)
will be rebalanced approximately equally across the
cluster. Note that for big clusters, this data transfer
could be time consuming and result in delayed query
responses.
Supported values:
The default value is TRUE
.
TABLE_WHITELIST
: Comma-separated list of unsharded
table names to rebalance. Not applicable to sharded
tables because they are always balanced in accordance
with their primary key or shard key. Cannot be used
simultaneously with table_blacklist
.
TABLE_BLACKLIST
: Comma-separated list of unsharded
table names to not rebalance. Not applicable to sharded
tables because they are always balanced in accordance
with their primary key or shard key. Cannot be used
simultaneously with table_whitelist
.
AGGRESSIVENESS
: Influences how much data to send per
rebalance round. A higher aggressiveness setting will
complete the rebalance faster. A lower aggressiveness
setting will take longer, but allow for better
interleaving between the rebalance and other queries.
Allowed values are 1 through 10. The default value is
'1'.
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 TRUE
.
COMPACT_ONLY
: Only perform compaction, do not
rebalance. Default is false.
Supported values:
The default value is FALSE
.
REPAIR_INCORRECTLY_SHARDED_DATA
: Scans for any data
sharded incorrectly and re-routes the correct location.
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. This option
may also lengthen rebalance time, and increase the
memory used by the rebalance.
Supported values:
The default value is FALSE
.
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2020. All rights reserved.