diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/UDFUtils.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/UDFUtils.java index 1bc79ab94ed262f1fa8d34d23f3d084605f2d308..71234f5539511488d6b518dd594a1ce18f81e90a 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/UDFUtils.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/UDFUtils.java @@ -73,13 +73,11 @@ public class UDFUtils { String resourceFullName; Set> entries = udfFuncTenantCodeMap.entrySet(); for (Map.Entry entry:entries){ + String prefixPath = defaultFS.startsWith("file://") ? "file://" : defaultFS; String uploadPath = HadoopUtils.getHdfsUdfDir(entry.getValue()); - if (!uploadPath.startsWith("hdfs:")) { - uploadPath = defaultFS + uploadPath; - } resourceFullName = entry.getKey().getResourceName(); resourceFullName = resourceFullName.startsWith("/") ? resourceFullName : String.format("/%s",resourceFullName); - sqls.add(String.format("add jar %s%s", uploadPath, resourceFullName)); + sqls.add(String.format("add jar %s%s%s", prefixPath, uploadPath, resourceFullName)); } }