Doris如何创建workload group?

提问者:帅平 问题分类:面试刷题
Doris如何创建workload group?workload group如何使用?
1 个回答
我是白云
我是白云
使用workload group的案例是:
#创建某个用户
create user 'test'@'%' IDENTIFIED  BY 'test';
#给用户授权
grant SELECT_PRIV,LOAD_PRIV,CREATE_PRIV,ALTER_PRIV ON test.* TO test;
#在fe.conf中配置如下项,并重启
experimental_enable_workload_group=true
#在执行环境开启pipline
set experimental_enable_pipeline_engine = true;
#创建workload group
create workload group if not exists test_query
properties (
    "cpu_share"="10",
    "memory_limit"="10%",
    "enable_memory_overcommit"="true",
    "max_concurrency" = "1",
    "max_queue_size" = "2",
    "queue_timeout" = "3000"
);
#给用户赋予group权限
GRANT USAGE_PRIV ON WORKLOAD GROUP 'test_query' TO 'test'@'%';
#登录当前用户
mysql -utest -h127.0.0.1 -P9030 -ptest
#设置group环境变量
set property 'default_workload_group'='test_query';
#执行并发查询
select * from test;
发布于:4个月前 (02-19) IP属地:未知
我来回答