Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
6101f8a
bak
peacewong Aug 19, 2024
adf9b5d
修复json4s问题
peacewong Aug 20, 2024
6b48401
Merge remote-tracking branch 'origin/dev-1.7.0-webank' into dev-1.7.0…
peacewong Aug 21, 2024
8b45350
解决编译问题
peacewong Aug 21, 2024
934b205
Dev 1.7.1 add python module load hook (#584)
kinsanities Aug 24, 2024
227511f
【1.7.1】python物料管理 (#583)
v-kkhuang Aug 24, 2024
01ea074
人工修改 code format and add rpc func
kinsanities Aug 24, 2024
3a513b2
fix bug
kinsanities Aug 24, 2024
7bc3a82
Dev 1.7.0 python udf manager (#586)
v-kkhuang Aug 25, 2024
694935f
fix bug
kinsanities Aug 25, 2024
60f743b
fix bug
kinsanities Aug 25, 2024
7237bea
code format
kinsanities Aug 25, 2024
97f5301
使用ai生成单元测试案例
kinsanities Aug 25, 2024
f0fba9e
人工修改单元测试
kinsanities Aug 25, 2024
f070f29
人工修改单元测试
kinsanities Aug 25, 2024
69c3091
Dev 1.7.1 webank test (#587)
kinsanities Aug 25, 2024
51e8b70
add log
kinsanities Aug 25, 2024
554013a
computation 模块的代码合并,除Entrance都已经进行合并
peacewong Aug 27, 2024
88f28f6
Merge remote-tracking branch 'origin/dev-1.7.1-webank' into dev-1.7.0…
peacewong Aug 27, 2024
eaab3b9
移除Json4s
peacewong Aug 27, 2024
8532fc6
合并storage和hdfs模块
peacewong Aug 27, 2024
cd4f586
Fix Fs问题
peacewong Aug 28, 2024
43a9c7e
Fix jdbc 复杂类型的值转换bug
peacewong Aug 28, 2024
d8d3827
合并spring和orchestrator等模块
peacewong Aug 28, 2024
660266e
YYYYMMddHH 变量时分秒修改为取当前值
peacewong Aug 29, 2024
9a599d0
完成所有模块的合并
peacewong Aug 30, 2024
4a6b417
完成所有模块的合并
peacewong Aug 30, 2024
82474e8
修复编译问题
peacewong Aug 30, 2024
9ad7048
修复编译问题
peacewong Sep 2, 2024
aa544f1
修复编译问题
peacewong Sep 2, 2024
8a50cec
修复编译问题
peacewong Sep 2, 2024
98683d7
修复编译问题
peacewong Sep 2, 2024
77bb406
Merge remote-tracking branch 'origin/dev-1.8.0-webank' into dev-1.7.0…
peacewong Sep 2, 2024
7d82cf4
修复编译问题
peacewong Sep 2, 2024
0a88fab
修复编译问题
peacewong Sep 3, 2024
7b17035
修复编译问题
peacewong Sep 3, 2024
9bea35d
修复编译问题
peacewong Sep 3, 2024
54e6b79
修复编译问题
peacewong Sep 3, 2024
0281290
update version to 1.9.0
kinsanities Sep 25, 2024
c94555c
Merge branch 'dev-1.8.0-webank' into dev-1.9.0-webank
peacewong Oct 1, 2024
ecdc004
Merge remote-tracking branch 'origin/dev-1.9.0-webank' into dev-1.7.0…
peacewong Oct 1, 2024
8744f9c
代码合并
peacewong Oct 1, 2024
06a491e
修复编译问题
peacewong Oct 1, 2024
2ccee09
fix: pom update (#613)
taoran1250 Oct 10, 2024
23dc321
add udf check extention for spark (#616)
kinsanities Oct 18, 2024
76d3dfb
修复npe问题
peacewong Oct 18, 2024
6079ad6
Merge remote-tracking branch 'origin/dev-1.9.0-webank' into dev-1.9.0…
peacewong Oct 18, 2024
b372c9c
Hive 支持字符串带制表符号
peacewong Oct 20, 2024
002dad1
修复编译问题
peacewong Oct 22, 2024
8a41397
修复客户端拉日志空指针问题
peacewong Oct 23, 2024
4cac70d
需要加上execID的确认保存
peacewong Oct 23, 2024
f7b22a6
[1.9.0]Added StarRocks task timeout alarm and timeout kill function (…
v-kkhuang Oct 23, 2024
4343af7
Improve the handling of decimal data types (#614)
v-kkhuang Oct 23, 2024
ff8f89c
[1.9.0]Data source password encryption enhancement (#612)
v-kkhuang Oct 23, 2024
f39700f
Add synchronized department user table scheduled tasks (#593)
v-kkhuang Oct 23, 2024
18feb94
[1.9.0]Add department level result set restriction configuration and …
v-kkhuang Oct 23, 2024
4605855
change to yarn proxy url
Aug 21, 2024
3eaca16
fix compile error
Alexkun Oct 23, 2024
af9bf53
修复重复问题
peacewong Oct 24, 2024
3565322
Merge remote-tracking branch 'origin/dev-1.9.0-webank' into dev-1.9.0…
peacewong Oct 24, 2024
b45a4c7
[1.9.0]Fix Hive dependency issues (#618)
v-kkhuang Oct 25, 2024
4eef5d4
Fix get tables only get table bug
peacewong Oct 25, 2024
3f31d5f
Merge remote-tracking branch 'origin/dev-1.9.0-webank' into dev-1.9.0…
peacewong Oct 25, 2024
c934f0b
fix datasource error (#620)
v-kkhuang Oct 28, 2024
70c2cab
Python module optimization upload (#619)
v-kkhuang Oct 28, 2024
5c8b21d
Dev 1.9.0 fix bug (#621)
v-kkhuang Oct 28, 2024
dbaa832
Dev 1.9.0 fix bug (#622)
v-kkhuang Oct 28, 2024
2e960bb
code format
kinsanities Oct 28, 2024
d9e94c1
Dev 1.9.0 fix bug (#623)
v-kkhuang Oct 28, 2024
98195d2
add udf func check
kinsanities Oct 28, 2024
8272ced
Merge branch 'dev-1.9.0-webank' of https://github.com/WeDataSphere/li…
kinsanities Oct 28, 2024
181a2e9
add udf func check
kinsanities Oct 28, 2024
98f7431
Merge remote-tracking branch 'origin/dev-1.9.0-webank' into dev-1.9.0…
Oct 29, 2024
b5bada7
Merge remote-tracking branch 'origin/dev-1.9.0-webank' into dev-1.9.0…
Oct 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.linkis.common.exception;

public class LinkisRetryException extends LinkisException {
public class LinkisRetryException extends LinkisRuntimeException {
LinkisRetryException(int errCode, String desc, String ip, int port, String serviceKind) {
super(errCode, desc, ip, port, serviceKind);
}
Expand All @@ -27,7 +27,7 @@ public LinkisRetryException(int errCode, String desc) {
}

@Override
ExceptionLevel getLevel() {
public ExceptionLevel getLevel() {
return ExceptionLevel.RETRY;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.linkis.common.utils;

import org.apache.linkis.common.exception.ErrorException;
import org.apache.linkis.common.exception.FatalException;
import org.apache.linkis.common.exception.WarnException;

import java.util.concurrent.Callable;
import java.util.function.Function;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LinkisUtils {
private static final Logger logger = LoggerFactory.getLogger(LinkisUtils.class);

public static <T> T tryCatch(Callable<T> tryOp, Function<Throwable, T> catchOp) {
T result = null;
try {
result = tryOp.call();
} catch (Throwable t) {
if (t instanceof FatalException) {
logger.error("Fatal error, system exit...", t);
System.exit(((FatalException) t).getErrCode());
} else if (t instanceof VirtualMachineError) {
logger.error("Fatal error, system exit...", t);
System.exit(-1);
} else if (null != t.getCause()
&& (t.getCause() instanceof FatalException
|| t.getCause() instanceof VirtualMachineError)) {
logger.error("Caused by fatal error, system exit...", t);
System.exit(-1);
} else if (t instanceof Error) {
logger.error("Throw error", t);
throw (Error) t;
} else {
result = catchOp.apply(t);
}
}
return result;
}

public static void tryFinally(Runnable tryOp, Runnable finallyOp) {
try {
tryOp.run();
} finally {
finallyOp.run();
}
}

public static <T> T tryAndWarn(Callable<T> tryOp, Logger log) {
return tryCatch(
tryOp,
t -> {
if (t instanceof ErrorException) {
ErrorException error = (ErrorException) t;
log.error(
"Warning code(警告码): {}, Warning message(警告信息): {}.",
error.getErrCode(),
error.getDesc(),
error);

} else if (t instanceof WarnException) {
WarnException warn = (WarnException) t;
log.warn(
"Warning code(警告码): {}, Warning message(警告信息): {}.",
warn.getErrCode(),
warn.getDesc(),
warn);

} else {
log.warn("", t);
}
return null;
});
}

public static void tryAndErrorMsg(Runnable tryOp, String message, Logger log) {
try {
tryOp.run();
} catch (WarnException t) {
WarnException warn = (WarnException) t;
log.warn(
"Warning code(警告码): {}, Warning message(警告信息): {}.", warn.getErrCode(), warn.getDesc());
log.warn(message, warn);
} catch (Exception t) {
log.warn(message, t);
}
}

public static <T> void tryAndWarn(Runnable tryOp, Logger log) {
try {
tryOp.run();
} catch (Throwable error) {
if (error instanceof WarnException) {
WarnException warn = (WarnException) error;
log.warn(
"Warning code(警告码): {}, Warning message(警告信息): {}.",
warn.getErrCode(),
warn.getDesc(),
error);
} else {
log.warn("", error);
}
}
}

public static void tryAndWarnMsg(Runnable tryOp, String message, Logger log) {
try {
tryOp.run();
} catch (WarnException t) {
WarnException warn = (WarnException) t;
log.warn(
"Warning code(警告码): {}, Warning message(警告信息): {}.", warn.getErrCode(), warn.getDesc());
log.warn(message, warn);
} catch (Exception t) {
log.warn(message, t);
}
}

public static <T> T tryAndWarnMsg(Callable<T> tryOp, String message, Logger log) {
return tryCatch(
tryOp,
t -> {
if (t instanceof ErrorException) {
ErrorException error = (ErrorException) t;
log.warn(
"Warning code(警告码): {}, Warning message(警告信息): {}.",
error.getErrCode(),
error.getDesc());
log.warn(message, error);
} else if (t instanceof WarnException) {
WarnException warn = (WarnException) t;
log.warn(
"Warning code(警告码): {}, Warning message(警告信息): {}.",
warn.getErrCode(),
warn.getDesc());
log.warn(message, warn);
} else {
log.warn(message, t);
}
return null;
});
}

public static String getJvmUser() {
return System.getProperty("user.name");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,40 @@ private static boolean isNotSecurity(String key, String value, String param) {
return key.toLowerCase().contains(param.toLowerCase())
|| value.toLowerCase().contains(param.toLowerCase());
}

/**
* allowLoadLocalInfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false
*
* @return
*/
public static Properties getMysqlSecurityParams() {
Properties properties = new Properties();
properties.setProperty("allowLoadLocalInfile", "false");
properties.setProperty("autoDeserialize", "false");
properties.setProperty("allowLocalInfile", "false");
properties.setProperty("allowUrlInLocalInfile", "false");
return properties;
}

/**
* Check if the path has a relative path
*
* @param path
* @return
*/
public static boolean containsRelativePath(String path) {
if (path.startsWith("./")
|| path.contains("/./")
|| path.startsWith("../")
|| path.contains("/../")) {
return true;
}
if (path.startsWith(".\\")
|| path.contains("\\.\\")
|| path.startsWith("..\\")
|| path.contains("\\..\\")) {
return true;
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ object Configuration extends Logging {

val IS_PROMETHEUS_ENABLE = CommonVars("wds.linkis.prometheus.enable", false)

val IS_MULTIPLE_YARN_CLUSTER = CommonVars("linkis.multiple.yarn.cluster", false).getValue

val PROMETHEUS_ENDPOINT = CommonVars("wds.linkis.prometheus.endpoint", "/actuator/prometheus")

val LINKIS_HOME = CommonVars("wds.linkis.home", CommonVars("LINKIS_HOME", "/tmp").getValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,28 @@ object HadoopConf {

val KERBEROS_ENABLE = CommonVars("wds.linkis.keytab.enable", false).getValue

val KERBEROS_ENABLE_MAP =
CommonVars("linkis.keytab.enable.map", "cluster1=false,cluster2=true")

val KEYTAB_FILE = CommonVars("wds.linkis.keytab.file", "/appcom/keytab/")

val EXTERNAL_KEYTAB_FILE_PREFIX =
CommonVars("linkis.external.keytab.file.prefix", "/appcom/config/external-conf/keytab")

val KEYTAB_HOST = CommonVars("wds.linkis.keytab.host", "127.0.0.1")

val KEYTAB_HOST_MAP =
CommonVars("linkis.keytab.host.map", "cluster1=127.0.0.2,cluster2=127.0.0.3")

val KEYTAB_HOST_ENABLED = CommonVars("wds.linkis.keytab.host.enabled", false)

val KEYTAB_PROXYUSER_ENABLED = CommonVars("wds.linkis.keytab.proxyuser.enable", false)

val KEYTAB_PROXYUSER_SUPERUSER = CommonVars("wds.linkis.keytab.proxyuser.superuser", "hadoop")

val KEYTAB_PROXYUSER_SUPERUSER_MAP =
CommonVars("linkis.keytab.proxyuser.superuser.map", "cluster1=hadoop1,cluster2=hadoop2")

val hadoopConfDir =
CommonVars("hadoop.config.dir", CommonVars("HADOOP_CONF_DIR", "").getValue).getValue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.apache.linkis.hadoop.common.conf.HadoopConf

import org.apache.hadoop.fs.FileSystem

class HDFSFileSystemContainer(fs: FileSystem, user: String) {
class HDFSFileSystemContainer(fs: FileSystem, user: String, label: String) {

private var lastAccessTime: Long = System.currentTimeMillis()

Expand All @@ -31,6 +31,8 @@ class HDFSFileSystemContainer(fs: FileSystem, user: String) {

def getUser: String = this.user

def getLabel: String = this.label

def getLastAccessTime: Long = this.lastAccessTime

def updateLastAccessTime: Unit = {
Expand Down
Loading