Version:

/admin/remove/ranks

URL: http://GPUDB_IP_ADDRESS:GPUDB_PORT/admin/remove/ranks

Remove one or more ranks from the cluster. All data in the ranks to be removed is rebalanced to other ranks before the node is removed unless the rebalance_sharded_data or rebalance_unsharded_data parameters are set to false in the input parameter options.

Due to the rebalancing, 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 /create/job.

Input Parameter Description

Name Type Description
ranks array of ints Rank numbers of the ranks to be removed from the cluster.
options map of string to strings

Optional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys) Parameter Description
rebalance_sharded_data

When true, data with primary keys or shard keys will be rebalanced to other ranks prior to rank removal. Note that for big clusters, this data transfer could be time consuming and result in delayed query responses. The default value is true. The supported values are:

  • true
  • false
rebalance_unsharded_data

When true, unsharded data (data without primary keys and without shard keys) will be rebalanced to other ranks prior to rank removal. Note that for big clusters, this data transfer could be time consuming and result in delayed query responses. The default value is true. The supported values are:

  • true
  • false
aggressiveness Influences how much data to send per rebalance round, during the rebalance portion of removing ranks. 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'.

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

Name Type Description
status String 'OK' or 'ERROR'
message String Empty if success or an error message
data_type String 'admin_remove_ranks_request' or 'none' in case of an error
data String Empty string
data_str JSON or String

This embedded JSON represents the result of the /admin/remove/ranks endpoint:

Name Type Description
removed_ranks array of ints Ranks that were removed from the cluster. May be empty in the case of failures.
results array of strings Text description of the result of each rank being removed. Indicates the reason for any errors that occur. Entries are in the same order as the input parameter ranks.
info map of string to strings Additional information.

Empty string in case of an error.