Purpose
This statement is used for unit migration.
This statement can only be executed in the sys tenant.
When the resource distribution among multiple OBServer nodes in a single zone of the cluster is unbalanced, you can adjust the resource allocation for tenants to achieve balanced resource usage across the cluster. Before performing unit migration, you need to disable load balancing using the following syntax:
obclient> ALTER SYSTEM SET enable_rebalance = false;
Syntax
alter_system_unit_stmt:
ALTER SYSTEM MIGRATE
UNIT [=] unit_id DESTINATION [=] ip_port
unit_id:
INT_VALUE
Parameters
Parameters |
Description |
|---|---|
| unit_id | Unit number. |
| ip_port | The target server address to migrate the unit to. |
Examples
Migrate the resource unit whose unit_id is 1001 to the OBServer at IP address xxx.xxx.xx.xx1.
obclient> ALTER SYSTEM MIGRATE UNIT = 1001 DESTINATION = 'xxx.xxx.xx.xx1:xxxx';
Query OK, 0 rows affected