This is an automated email from the ASF dual-hosted git repository.

journey pushed a commit to branch 1.3.2-release
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.2-release by this push:
     new a3793be  [Fix-3390][server]Running hive sql task need find the hdfs 
path correctly (#3396)
a3793be is described below

commit a3793be7dabb7aa84eb518b592d82860a1cc3003
Author: lgcareer <[email protected]>
AuthorDate: Tue Aug 4 15:04:56 2020 +0800

    [Fix-3390][server]Running hive sql task need find the hdfs path correctly 
(#3396)
    
    * [Fix-3390][api]Running hive sql task need find the hdfs path correctly
    
    * [Fix-3390][api]Running hive sql task need find the hdfs path correctly
    
    * update soft version
---
 .../dolphinscheduler/common/process/ResourceInfo.java  | 18 ------------------
 .../apache/dolphinscheduler/server/utils/UDFUtils.java |  6 ++++--
 sql/soft_version                                       |  2 +-
 3 files changed, 5 insertions(+), 21 deletions(-)

diff --git 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ResourceInfo.java
 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ResourceInfo.java
index c460354..287f726 100644
--- 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ResourceInfo.java
+++ 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/process/ResourceInfo.java
@@ -42,22 +42,4 @@ public class ResourceInfo {
   public void setRes(String res) {
     this.res = res;
   }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    ResourceInfo that = (ResourceInfo) o;
-
-    if (id != that.id) return false;
-    return res.equals(that.res);
-  }
-
-  @Override
-  public int hashCode() {
-    int result = id;
-    result = 31 * result + res.hashCode();
-    return result;
-  }
 }
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 3a8c8fe..1bc79ab 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
@@ -70,14 +70,16 @@ public class UDFUtils {
      */
     private static void buildJarSql(List<String> sqls, Map<UdfFunc,String> 
udfFuncTenantCodeMap) {
         String defaultFS = 
HadoopUtils.getInstance().getConfiguration().get(Constants.FS_DEFAULTFS);
-
+        String resourceFullName;
         Set<Map.Entry<UdfFunc,String>> entries = 
udfFuncTenantCodeMap.entrySet();
         for (Map.Entry<UdfFunc,String> entry:entries){
             String uploadPath = HadoopUtils.getHdfsUdfDir(entry.getValue());
             if (!uploadPath.startsWith("hdfs:")) {
                 uploadPath = defaultFS + uploadPath;
             }
-            sqls.add(String.format("add jar %s%s", uploadPath, 
entry.getKey().getResourceName()));
+            resourceFullName = entry.getKey().getResourceName();
+            resourceFullName = resourceFullName.startsWith("/") ? 
resourceFullName : String.format("/%s",resourceFullName);
+            sqls.add(String.format("add jar %s%s", uploadPath, 
resourceFullName));
         }
 
     }
diff --git a/sql/soft_version b/sql/soft_version
index 6261a05..d5e98f7 100644
--- a/sql/soft_version
+++ b/sql/soft_version
@@ -1 +1 @@
-1.3.1
\ No newline at end of file
+1.3.2
\ No newline at end of file

Reply via email to