When you create a tenant, if the current resource pool is occupied by another tenant, you need to create a new resource pool.
Prerequisites
Before you create a resource pool by using an SQL statement, make sure that the resource units to be used have been created. For information about how to create a resource unit, see Create a resource unit.
Create a resource pool
Only the sys tenant can create resource pools. The syntax is as follows:
CREATE RESOURCE POOL poolname
UNIT [=] unitname,
UNIT_NUM [=] unitnum,
ZONE_LIST [=] ('zone' [, 'zone'...]);
The parameters are described as follows:
The
UNIT_NUMparameter specifies the number of resource units contained in a zone in the cluster. The value must be smaller than or equal to the number of OBServer nodes in the zone.The
ZONE_LISTparameter specifies the zones that are allowed to use resources in the resource pool.
Here is an example:
Log on to the
systenant as therootuser.Create a resource pool named
pool1and specify resource configurations for it.obclient> CREATE RESOURCE POOL pool1 UNIT='unit1',UNIT_NUM=1,ZONE_LIST=('zone1','zone2','zone3');
More information
After a resource pool is created, you can allocate it to a tenant or modify it based on your business needs. For more information about resource pool management, see Manage resource pools.