From 2955526beeffcadaa649957d46060279518072c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=89=BA=E4=B8=B9?= <53546877+Craven1701@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:17:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(OmniAdvisor)=20=E4=BF=AE=E5=A4=8D=E5=BD=93?= =?UTF-8?q?test=5Fconfig=E6=89=A7=E8=A1=8C=E5=A4=B1=E8=B4=A5=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E8=83=BD=E4=BB=8Eload=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=B8=AD=E6=B8=85=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/omniadvisor/interface/hijack_recommend.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/omniadvisor/src/omniadvisor/interface/hijack_recommend.py b/omniadvisor/src/omniadvisor/interface/hijack_recommend.py index 76dfde80f..7ff308120 100644 --- a/omniadvisor/src/omniadvisor/interface/hijack_recommend.py +++ b/omniadvisor/src/omniadvisor/interface/hijack_recommend.py @@ -266,6 +266,13 @@ def hijack_recommend(argv: list) -> None: # 根据配置和负载执行Spark任务 global_logger.info("Going to execute Spark load ……") exam_record, output = spark_run(load=load, config=exec_config, wait_for_trace=False, exec_in_isolation=False) + + if exec_config != load.default_config: + # 创建子进程处理负载配置,不阻塞 + p = multiprocessing.Process(target=_process_load_config, args=(load, exec_config)) + p.daemon = False + p.start() + # 执行结果分析 if exam_record.status == OA_CONF.ExecStatus.success: # 打印结果输出 @@ -279,12 +286,6 @@ def hijack_recommend(argv: list) -> None: global_logger.warning("Spark execute failed in user config, going to print Spark output.") print(output, end="", flush=True) - if exec_config != load.default_config: - # 创建子进程处理负载配置,不阻塞 - p = multiprocessing.Process(target=_process_load_config, args=(load, exec_config)) - p.daemon = False - p.start() - def main(): """ -- Gitee