From 4f0b1404011bfecb86b23a31ca345861ac81016a 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: Mon, 14 Jul 2025 11:43:00 +0800 Subject: [PATCH] =?UTF-8?q?1.-e=E5=8F=82=E6=95=B0=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=A4=84=E7=90=86=20=E6=94=AF=E6=8C=81=E5=AF=B9=E4=BA=8E--e?= =?UTF-8?q?=E8=BF=99=E7=B1=BB=E6=8F=90=E4=BA=A4=E7=9A=84=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=202.=E7=BC=96=E8=AF=91pyc=E6=96=87=E4=BB=B6=E6=97=B6=E4=BD=BF?= =?UTF-8?q?=E7=94=A8PycInvalidationMode.CHECKED=5FHASH=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E6=97=B6=E9=97=B4=E6=88=B3=E9=97=AE=E9=A2=98=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E7=9A=84pyc=E6=96=87=E4=BB=B6=E5=B7=AE=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/omniadvisor/service/spark_service/spark_cmd_parser.py | 3 ++- omniadvisor/src/setup.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/omniadvisor/src/omniadvisor/service/spark_service/spark_cmd_parser.py b/omniadvisor/src/omniadvisor/service/spark_service/spark_cmd_parser.py index 2f865a2b1..2e8b44d38 100644 --- a/omniadvisor/src/omniadvisor/service/spark_service/spark_cmd_parser.py +++ b/omniadvisor/src/omniadvisor/service/spark_service/spark_cmd_parser.py @@ -65,7 +65,8 @@ class SparkCMDParser: _parser.add_argument('--keytab') _parser.add_argument('--queue') _parser.add_argument('-d', '--database') - _parser.add_argument('-e', type=str, help='SQL statement to execute.') + # 支持对于--e这种形式的入参解析 但是--e为spark非官方用法 故在命令reconstruct的时候仍然使用-e的方式重建命令 + _parser.add_argument('-e', '--e', type=str, help='SQL statement to execute.') _parser.add_argument('-f', type=str, help='File containing SQL script.') _parser.add_argument('-i', help='Initialization SQL file') # boolean变量 diff --git a/omniadvisor/src/setup.py b/omniadvisor/src/setup.py index d23c92eb7..18ae835f9 100644 --- a/omniadvisor/src/setup.py +++ b/omniadvisor/src/setup.py @@ -29,7 +29,8 @@ def find_py_files(root): # 编译成 .pyc,并删除原 .py文件 py_path = os.path.join(dirpath, f) # 编译生成.pyc文件 - py_compile.compile(py_path, cfile=py_path + 'c') + py_compile.compile(py_path, cfile=py_path + 'c', + invalidation_mode=py_compile.PycInvalidationMode.CHECKED_HASH) # 删除原.py文件 os.remove(py_path) continue -- Gitee