[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
This commit is contained in:
parent
88bc30b32b
commit
a3793be7da
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
1.3.1
|
||||
1.3.2
|
||||
Loading…
Reference in New Issue