Purpose
You can use this statement to modify a resource pool.
Syntax
ALTER RESOURCE POOL {
pool_name
UNIT [=] unit_name,
UNIT_NUM [=] unit_num [DELETE UNIT = (unit_id_list)],
ZONE_LIST [=] ('zone_name' [, 'zone_name' ...])
| MERGE
('pool_name'[, 'pool_name' ...])
INTO ('merge_pool_name')
| SPLIT INTO ('pool_name' [, 'pool_name' ...])
ON ('zone_name' [, 'zone_name' ...])
};
Parameters
| Parameter | Description |
|---|---|
| unit_name | The name of the resource unit to be used. |
| unit_num | The number of units in a zone after the modification, which must be less than or equal to the number of OBServer nodes in the zone.
NoticeAfter a resource pool is allocated to a tenant, you cannot use the |
| unit_id_list | When you attempt to decrease the value of unit_num, you can use the DELETE UNIT keyword to specify the units to be deleted. If the DELETE UNIT parameter is not specified, the system automatically selects the units to be deleted.
NoticeWhen you use
|
| ZONE_LIST | The zone list of the resource pool. |
| MERGE | Merges multiple resource pools. The resource pools can still be used by the tenant when they are being merged. They are merged into one resource pool only from the perspective of the management layer in which the RootService is located, to facilitate unified maintenance. |
| SPLIT | Splits a resource pool into multiple resource pools. |
| merge_pool_name | The name of the merged resource pool. |
Examples
You can modify only one attribute of resource pool
pool1at a time. For example, the following statement attempts to modify theUNIT,UNIT_NUM, andZONE_LISTattributes at a time, and an error will occur during its execution.obclient> ALTER RESOURCE POOL pool1 UNIT='unit2', UNIT_NUM=1, ZONE_LIST=('zone1'); ERROR 1235 (0A000): alter unit_num, resource_unit, zone_list in one cmd not supportedWhen you attempt to decrease the value of
UNIT_NUM, you can specify the units to be deleted.obclient> ALTER RESOURCE POOL pool1 UNIT_NUM=1 DELETE UNIT = (1002); Query OK, 0 rows affectedModify the
UNITattribute of resource poolpool1.obclient> ALTER RESOURCE POOL pool1 UNIT='unit2'; Query OK, 0 rows affectedSplit resource pool
pool1into resource poolspool10andpool11.obclient> CREATE RESOURCE POOL pool1 unit='unit1',unit_num=1,zone_list=('zone1','zone2'); Query OK, 0 rows affected obclient> ALTER RESOURCE POOL pool1 SPLIT INTO ('pool10','pool11') ON ('zone1','zone2'); Query OK, 0 rows affectedMerge resource pools
pool0,pool1, andpool2oftenant1for unified management.obclient>ALTER RESOURCE POOL MERGE ('pool0','pool1','pool2') INTO ('pool3'); Query OK, 0 rows affected