diff --git a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/com/webank/wedatasphere/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/com/webank/wedatasphere/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala index 361cfe120a..2f6091089e 100644 --- a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/com/webank/wedatasphere/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala +++ b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/com/webank/wedatasphere/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala @@ -169,16 +169,6 @@ class TaskExecutionServiceImpl extends TaskExecutionService with Logging with Re val runTask = new Runnable { override def run(): Unit = Utils.tryAndWarn { LogHelper.dropAllRemainLogs() - val response = computationExecutor.execute(task) - response match { - case ErrorExecuteResponse(message, throwable) => - sendToEntrance(task, ResponseTaskError(task.getTaskId, message)) - error(message, throwable) - LogHelper.pushAllRemainLogs() - computationExecutor.transformTaskStatus(task, ExecutionNodeStatus.Failed) - case _ => - } - clearCache(task.getTaskId) executeTask(task, computationExecutor) } } diff --git a/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/conf/LabelCommonConfig.java b/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/conf/LabelCommonConfig.java index 1be184e0c7..2f74cbed8b 100644 --- a/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/conf/LabelCommonConfig.java +++ b/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/conf/LabelCommonConfig.java @@ -49,5 +49,9 @@ public class LabelCommonConfig { public final static CommonVars FLINK_ENGINE_VERSION = CommonVars.apply("wds.linkis.flink.engine.version", "1.12.2"); public final static CommonVars PERMANENT_LABEL = CommonVars.apply("wds.linkis.am.permanent.label", "tenant"); + + public final static CommonVars ENGINE_CONN_MANAGER_SPRING_NAME = CommonVars.apply("wds.linkis.engineconn.manager.name", "linkis-cg-engineconnmanager"); + + public final static CommonVars ENGINE_CONN_SPRING_NAME = CommonVars.apply("wds.linkis.engineconn.name", "linkis-cg-engineconn"); } diff --git a/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/em/EMInstanceLabel.java b/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/em/EMInstanceLabel.java index e5756c47c7..2b7df86cdf 100644 --- a/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/em/EMInstanceLabel.java +++ b/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/em/EMInstanceLabel.java @@ -17,6 +17,7 @@ package com.webank.wedatasphere.linkis.manager.label.entity.em; import com.webank.wedatasphere.linkis.common.ServiceInstance; +import com.webank.wedatasphere.linkis.manager.label.conf.LabelCommonConfig; import com.webank.wedatasphere.linkis.manager.label.constant.LabelKeyConstant; import com.webank.wedatasphere.linkis.manager.label.entity.EMNodeLabel; import com.webank.wedatasphere.linkis.manager.label.entity.EngineNodeLabel; @@ -73,8 +74,8 @@ public ServiceInstance getServiceInstance(){ @Override protected void setStringValue(String stringValue){ - String instance = stringValue.substring(stringValue.lastIndexOf('-') + 1, stringValue.length()); - String serviceName = stringValue.substring(0, stringValue.lastIndexOf('-')); + String instance = stringValue.replace(LabelCommonConfig.ENGINE_CONN_MANAGER_SPRING_NAME.getValue() + "-", ""); + String serviceName = LabelCommonConfig.ENGINE_CONN_MANAGER_SPRING_NAME.getValue(); setInstance(instance); setServiceName(serviceName); } diff --git a/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/engine/EngineInstanceLabel.java b/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/engine/EngineInstanceLabel.java index 66bb21e35d..95dcf9fa69 100644 --- a/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/engine/EngineInstanceLabel.java +++ b/linkis-computation-governance/linkis-manager/label-common/src/main/java/com/webank/wedatasphere/linkis/manager/label/entity/engine/EngineInstanceLabel.java @@ -17,6 +17,7 @@ package com.webank.wedatasphere.linkis.manager.label.entity.engine; import com.webank.wedatasphere.linkis.common.ServiceInstance; +import com.webank.wedatasphere.linkis.manager.label.conf.LabelCommonConfig; import com.webank.wedatasphere.linkis.manager.label.constant.LabelKeyConstant; import com.webank.wedatasphere.linkis.manager.label.entity.EngineNodeLabel; import com.webank.wedatasphere.linkis.manager.label.entity.GenericLabel; @@ -69,4 +70,12 @@ public String getServiceName() { public ServiceInstance getServiceInstance() { return ServiceInstance.apply(getServiceName(), getInstance()); } + + @Override + protected void setStringValue(String stringValue){ + String instance = stringValue.replace(LabelCommonConfig.ENGINE_CONN_SPRING_NAME.getValue() + "-", ""); + String serviceName = LabelCommonConfig.ENGINE_CONN_SPRING_NAME.getValue(); + setInstance(instance); + setServiceName(serviceName); + } } diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/com/webank/wedatasphere/linkis/manager/am/conf/AMConfiguration.scala b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/com/webank/wedatasphere/linkis/manager/am/conf/AMConfiguration.scala index 8adf150638..7123d1e25a 100644 --- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/com/webank/wedatasphere/linkis/manager/am/conf/AMConfiguration.scala +++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/com/webank/wedatasphere/linkis/manager/am/conf/AMConfiguration.scala @@ -19,6 +19,7 @@ package com.webank.wedatasphere.linkis.manager.am.conf import com.webank.wedatasphere.linkis.common.conf.{CommonVars, TimeType} +import com.webank.wedatasphere.linkis.common.utils.Utils object AMConfiguration { @@ -52,9 +53,17 @@ object AMConfiguration { val MULTI_USER_ENGINE_TYPES = CommonVars("wds.linkis.multi.user.engine.types", "jdbc,es,presto,io_file,appconn") - val MULTI_USER_ENGINE_USER = CommonVars("wds.linkis.multi.user.engine.user", "{jdbc:\"hadoop\", es: \"hadoop\", presto:\"hadoop\",io_file:\"root\",appconn:\"hadoop\"}") + val DEFAULT_ENGINECONN_USER = Utils.getJvmUser + val MULTI_USER_ENGINE_USER = CommonVars("wds.linkis.multi.user.engine.user", getDefaultMultiEngineUser) + val MONITOR_SWITCH_ON = CommonVars("wds.linkis.manager.am.monitor.switch.on", true) val ENGINE_LOCKER_MAX_TIME = CommonVars("wds.linkis.manager.am.engine.locker.max.time", 1000*60*5) + + private def getDefaultMultiEngineUser(): String = { + val jvmUser = Utils.getJvmUser + s""" {jdbc:"$jvmUser", es: "$jvmUser", presto:"$jvmUser",appconn:"$jvmUser", io_file:"root"}""" + } + } diff --git a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/com/webank/wedatasphere/linkis/manager/engineplugin/jdbc/builder/JDBCProcessEngineConnLaunchBuilder.scala b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/com/webank/wedatasphere/linkis/manager/engineplugin/jdbc/builder/JDBCProcessEngineConnLaunchBuilder.scala index 7e9ded2f42..78032958d9 100644 --- a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/com/webank/wedatasphere/linkis/manager/engineplugin/jdbc/builder/JDBCProcessEngineConnLaunchBuilder.scala +++ b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/scala/com/webank/wedatasphere/linkis/manager/engineplugin/jdbc/builder/JDBCProcessEngineConnLaunchBuilder.scala @@ -22,8 +22,8 @@ import com.webank.wedatasphere.linkis.storage.utils.StorageConfiguration class JDBCProcessEngineConnLaunchBuilder extends JavaProcessEngineConnLaunchBuilder { - override def getEngineStartUser(label: UserCreatorLabel): String = { - StorageConfiguration.HDFS_ROOT_USER.getValue - } +// override def getEngineStartUser(label: UserCreatorLabel): String = { +// StorageConfiguration.HDFS_ROOT_USER.getValue +// } }