OceanBase 源码解读(五):租户的一生
CREATE RESOURCE UNIT unitname
MAX_CPU [=] cpunum,
MAX_MEMORY [=] memsize,
MAX_IOPS [=] iopsnum,
MAX_DISK_SIZE [=] disksize,
MAX_SESSION_NUM [=] sessionnum,
[MIN_CPU [=] cpunum,]
[MIN_MEMORY [=] memsize,]
[MIN_IOPS [=] iopsnum] ;
int ObRootService::create_resource_unit(const obrpc::ObCreateResourceUnitArg& arg)
CREATE RESOURCE POOL poolname
UNIT [=] unitname,
UNIT_NUM [=] unitnum,
ZONE_LIST [=] (‘zone’ [, ‘zone’ …]);
int ObRootService::create_resource_pool(const obrpc::ObCreateResourcePoolArg& arg)
int ObUnitManager::allocate_pool_units(ObISQLClient& client, const share::ObResourcePool& pool)
CREATE TENANT [IF NOT EXISTS] tenantname [tenant_characteristic_list] [opt_set_sys_var]tenant_characteristic_list: tenant_characteristic [, tenant_characteristic...]tenant_characteristic: COMMENT 'string' |{CHARACTER SET | CHARSET} [=] charsetname |COLLATE [=] collationname|REPLICA_NUM [=] num |ZONE_LIST [=] (zone [, zone…]) |PRIMARY_ZONE [=] zone |DEFAULT TABLEGROUP [=] {NULL | tablegroup}|RESOURCE_POOL_LIST [=](poolname [, poolname…])|LOGONLY_REPLICA_NUM [=] num|LOCALITY [=] 'locality description'opt_set_sys_var:{ SET | SET VARIABLES | VARIABLES } system_var_name = expr [,system_var_name = expr] ...
int ObRootService::create_tenant(const ObCreateTenantArg& arg, UInt64& tenant_id)
int ObDDLService::create_tenant_env(share::schema::ObSchemaGetterGuard& schema_guard, const obrpc::ObCreateTenantArg& arg,
const common::ObRegion& region, share::schema::ObTenantSchema& tenant_schema, const int64_t frozen_version,
const common::ObString* ddl_stmt_str = NULL);
DROP TENANT [IF EXISTS] tenant_name [FORCE];
int ObRootService::drop_tenant(const ObDropTenantArg& arg)
DROP RESOURCE POOL poolname;
int ObRootService::drop_resource_pool(const obrpc::ObDropResourcePoolArg& arg)
DROP RESOURCE UNIT unitname;
int ObRootService::drop_resource_unit(const obrpc::ObDropResourceUnitArg& arg)
相关文章