From e7fb89d41cb3b52a33e479f9fa06cc1c2db3a500 Mon Sep 17 00:00:00 2001 From: taoran1250 <543121890@qq.com> Date: Wed, 8 Jan 2025 14:14:02 +0800 Subject: [PATCH] fix: udf get function name optimization --- .../src/main/java/org/apache/linkis/udf/utils/UdfUtils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/utils/UdfUtils.java b/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/utils/UdfUtils.java index 6a8b6685cb..863388c82c 100644 --- a/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/utils/UdfUtils.java +++ b/linkis-public-enhancements/linkis-udf-service/src/main/java/org/apache/linkis/udf/utils/UdfUtils.java @@ -321,15 +321,11 @@ public static List extractScalaMethodNames(String scalaCode) { public static List extractPythonMethodNames(String udfPath) throws Exception { String localPath = udfPath.replace(StorageUtils$.MODULE$.FILE_SCHEMA(), ""); - String python3Path = Utils.exec(new String[] {"which", "python3"}); - if (StringUtils.isBlank(python3Path)) { - throw new UdfException(80043, "python3 not found"); - } String exec = Utils.exec( (new String[] { "sudo", - python3Path, + Constants.PYTHON_PATH.getValue(), Configuration.getLinkisHome() + "/admin/" + "linkis_udf_get_python_methods.py", localPath }));