[Feature](executor)Workload Group support Non-Pipeline Execution (#30164)
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
#include "pipeline/pipeline_fragment_context.h"
|
||||
#include "pipeline/pipeline_x/dependency.h"
|
||||
#include "runtime/runtime_query_statistics_mgr.h"
|
||||
#include "runtime/task_group/task_group_manager.h"
|
||||
|
||||
namespace doris {
|
||||
|
||||
@ -152,4 +153,28 @@ void QueryContext::register_cpu_statistics() {
|
||||
}
|
||||
}
|
||||
|
||||
void QueryContext::set_query_scheduler(uint64_t tg_id) {
|
||||
auto* tg_mgr = _exec_env->task_group_manager();
|
||||
tg_mgr->get_query_scheduler(tg_id, &_task_scheduler, &_scan_task_scheduler,
|
||||
&_non_pipe_thread_pool);
|
||||
}
|
||||
|
||||
doris::pipeline::TaskScheduler* QueryContext::get_pipe_exec_scheduler() {
|
||||
if (!config::enable_cgroup_cpu_soft_limit) {
|
||||
return _exec_env->pipeline_task_group_scheduler();
|
||||
} else if (_task_scheduler) {
|
||||
return _task_scheduler;
|
||||
} else {
|
||||
return _exec_env->pipeline_task_scheduler();
|
||||
}
|
||||
}
|
||||
|
||||
ThreadPool* QueryContext::get_non_pipe_exec_thread_pool() {
|
||||
if (_task_group) {
|
||||
return _non_pipe_thread_pool;
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace doris
|
||||
|
||||
Reference in New Issue
Block a user