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

casion pushed a commit to branch dev-1.3.1-errorcode
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.3.1-errorcode by this 
push:
     new 6bf25c054 [linkis-engineconn-plugin-core]module errorcode optimization 
and docu… (#3602)
6bf25c054 is described below

commit 6bf25c05422718d69958ea4942cd0f09fd0d5efd
Author: 成彬彬 <[email protected]>
AuthorDate: Tue Oct 18 10:27:20 2022 +0800

    [linkis-engineconn-plugin-core]module errorcode optimization and docu… 
(#3602)
---
 .../linkis-engineconn-plugin-core-errorcode.md     |  29 ++++
 .../AbstractCodeLanguageLabelExecutorFactory.scala |   5 +-
 .../core/execution/EngineConnExecution.scala       |   7 +-
 .../engineconn/core/executor/ExecutorManager.scala |   9 +-
 .../errorcode/EngineconnCoreErrorCodeSummary.java  | 159 +++++++++++++++++++++
 .../common/creation/EngineConnFactory.scala        |   6 +-
 .../exception/EngineConnPluginLoadException.scala  |   3 +-
 .../EngineConnPluginLoadResourceException.scala    |   3 +-
 .../EngineConnPluginNotFoundException.scala        |   3 +-
 .../JavaProcessEngineConnLaunchBuilder.scala       |   8 +-
 .../process/ProcessEngineConnLaunchBuilder.scala   |   9 +-
 .../exception/EngineConnPluginLoadException.scala  |   3 +-
 .../EngineConnPluginLoadResourceException.scala    |   3 +-
 .../EngineConnPluginNotFoundException.scala        |   3 +-
 .../resource/AbstractEngineResourceFactory.scala   |   3 +-
 .../loaders/DefaultEngineConnPluginLoader.java     |  14 +-
 .../BmlEngineConnPluginResourceLoader.java         |   4 +-
 .../AbstractEngineConnBmlResourceGenerator.scala   |  21 +--
 .../DefaultEngineConnBmlResourceGenerator.scala    |   5 +-
 .../service/DefaultEngineConnLaunchService.scala   |  10 +-
 .../DefaultEngineConnResourceFactoryService.scala  |   6 +-
 .../service/DefaultEngineConnResourceService.scala |   5 +-
 22 files changed, 276 insertions(+), 42 deletions(-)

diff --git a/docs/errorcode/linkis-engineconn-plugin-core-errorcode.md 
b/docs/errorcode/linkis-engineconn-plugin-core-errorcode.md
new file mode 100644
index 000000000..3415da1a2
--- /dev/null
+++ b/docs/errorcode/linkis-engineconn-plugin-core-errorcode.md
@@ -0,0 +1,29 @@
+## linkis-engineconn-plugin-core  errorcode
+
+| module name(模块名) | error code(错误码)  | describe(描述) |enumeration name(枚举)| 
Exception Class(类名)|
+| -------- | -------- | ----- |-----|-----|
+|linkis-engineconn-plugin-core |10001|Failed to 
createEngineConnLaunchRequest(未能创建EngineConnLaunchRequest)|FAILED_CREATE_ELR|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |10001|EngineTypeLabel are requested(请求 
EngineTypeLabel)|ETL_REQUESTED|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20000|Cannot instance EngineConnExecution(无法实例 
EngineConnExecution)|CANNOT_INSTANCE_ECE|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20000|Cannot find default 
ExecutorFactory(找不到默认的 
ExecutorFactory)|CANNOT_DEFAULT_EF|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20000|EngineTypeLabel is not 
exists(EngineTypeLabel 不存在)|ETL_NOT_EXISTS|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20000|UserCreatorLabel is not 
exists(UserCreatorLabel 不存在)|UCL_NOT_EXISTS|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20001|Cannot find the home path of 
engineConn(找不到engineConn的home路径)|CANNOT_HOME_PATH_EC|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20001|Cannot find the home path of engineconn 
dist(找不到 engineconn dist 
的home路径)|CANNOT_HOME_PATH_DIST|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20001|The dist of EngineConn is 
empty,engineConnType(EngineConn 的 dist 
为空,engineConnType):|DIST_IS_EMPTY|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20001|The dist of EngineConn is irregular, 
both the version dir and non-version dir are 
exist,engineConnType(EngineConn的dist是不规则的,版本目录和非版本目录都存在,engineConnType):|DIST_IRREGULAR_EXIST|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20001|System have no permission to delete old 
engineConn 
file,File(系统无权删除旧的engineConn文件,File):|NO_PERMISSION_FILE|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20001| The `lib` and `conf` dir is necessary 
in EngineConn dist,engineConnType(`lib` 和 `conf` 目录在 EngineConn dist 
中是必需的,engineConnType):|LIB_CONF_DIR_NECESSARY|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |20011| Not supported ExecutorFactory(不支持 
ExecutorFactory)|NOT_SUPPORTED_EF|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70101| DefaultEngineRunTypeLabel cannot be 
null(DefaultEngineRunTypeLabel 
不能为空)|DERTL_CANNOT_NULL|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70102|Cannot get label key. labels 
(无法获取标签key,标签):|CANNOT_GET_LABEL_KEY|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70103|The minResource {} is not the same with 
the maxResource(minResource {} 与 maxResource 
不同)|MINRESOURCE_MAXRESOURCE_NO_SAME|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70062|Failed to init engine conn plugin 
instance(无法初始化引擎连接插件实例)|FAILED_ENGINE_INSTANCE|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70062|No public constructor in 
pluginClass(pluginClass 
中没有公共构造函数)|NO_PUBLIC_CONSTRUCTOR|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70062|Illegal arguments in constructor of 
pluginClass(pluginClass 
的构造函数中的非法参数)|ILLEGAL_ARGUMENTS|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70062|Unable to construct 
pluginClass(无法构造pluginClass)|UNABLE_PLUGINCLASS|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70062|Unable to load 
class(无法加载类)|UNABLE_CLASS|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70063|No plugin found , please check your 
configuration(未找到插件,请检查您的配置)|NO_PLUGIN_FOUND|EngineconnCoreErrorCodeSummary|
+|linkis-engineconn-plugin-core |70064|Have no write permission to 
directory(对目录没有写权限)|NO_WRITE_PERMISSION|EngineconnCoreErrorCodeSummary|
+
+
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/creation/AbstractCodeLanguageLabelExecutorFactory.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/creation/AbstractCodeLanguageLabelExecutorFactory.scala
index c05ae9fb5..e28f745ed 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/creation/AbstractCodeLanguageLabelExecutorFactory.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/creation/AbstractCodeLanguageLabelExecutorFactory.scala
@@ -26,6 +26,7 @@ import 
org.apache.linkis.manager.engineplugin.common.exception.{
   EngineConnPluginErrorCode,
   EngineConnPluginErrorException
 }
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.Label
 import org.apache.linkis.manager.label.entity.engine.CodeLanguageLabel
 import org.apache.linkis.manager.label.entity.engine.RunType.RunType
@@ -37,8 +38,8 @@ trait AbstractCodeLanguageLabelExecutorFactory extends 
CodeLanguageLabelExecutor
     if (null == codeLanguageLabel) {
       logger.error("DefaultEngineRunTypeLabel must not be null!")
       throw new EngineConnPluginErrorException(
-        EngineConnPluginErrorCode.INVALID_RUNTYPE,
-        "DefaultEngineRunTypeLabel cannot be null."
+        DERTL_CANNOT_NULL.getErrorCode,
+        DERTL_CANNOT_NULL.getErrorDesc
       )
     }
     labels.exists {
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/execution/EngineConnExecution.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/execution/EngineConnExecution.scala
index a12af7dfb..18daac007 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/execution/EngineConnExecution.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/execution/EngineConnExecution.scala
@@ -20,6 +20,7 @@ package org.apache.linkis.engineconn.core.execution
 import org.apache.linkis.common.utils.{ClassUtils, Logging, Utils}
 import org.apache.linkis.engineconn.common.execution.EngineConnExecution
 import 
org.apache.linkis.manager.engineplugin.common.exception.EngineConnBuildFailedException
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary.CANNOT_INSTANCE_ECE
 
 import scala.collection.convert.decorateAsScala._
 
@@ -39,7 +40,11 @@ object EngineConnExecution extends Logging {
         .toArray
         .sortBy(_.getOrder)
     }(t =>
-      throw new EngineConnBuildFailedException(20000, "Cannot instance 
EngineConnExecution.", t)
+      throw new EngineConnBuildFailedException(
+        CANNOT_INSTANCE_ECE.getErrorCode,
+        CANNOT_INSTANCE_ECE.getErrorDesc,
+        t
+      )
     )
   }
 
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
index ba85aac96..c8737947f 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
@@ -32,6 +32,7 @@ import 
org.apache.linkis.manager.engineplugin.common.exception.{
   EngineConnPluginErrorCode,
   EngineConnPluginErrorException
 }
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.Label
 import org.apache.linkis.manager.label.utils.LabelUtil
 
@@ -87,7 +88,7 @@ class LabelExecutorManagerImpl extends LabelExecutorManager 
with Logging {
       case engineConnFactory =>
         val errorMsg = "Not supported ExecutorFactory " + 
engineConnFactory.getClass.getSimpleName
         logger.error(errorMsg)
-        throw new EngineConnPluginErrorException(20011, errorMsg)
+        throw new 
EngineConnPluginErrorException(NOT_SUPPORTED_EF.getErrorCode, errorMsg)
     }
 
   protected def tryCreateExecutor(
@@ -167,8 +168,10 @@ class LabelExecutorManagerImpl extends 
LabelExecutorManager with Logging {
   ): LabelExecutor = {
     val labelKey = getLabelKey(labels)
     if (null == labelKey) {
-      val msg = "Cannot get label key. labels : " + GSON.toJson(labels)
-      throw new 
EngineConnPluginErrorException(EngineConnPluginErrorCode.INVALID_LABELS, msg)
+      throw new EngineConnPluginErrorException(
+        CANNOT_GET_LABEL_KEY.getErrorCode,
+        CANNOT_GET_LABEL_KEY.getErrorDesc + GSON.toJson(labels)
+      )
     }
 
     if (!executors.containsKey(labelKey)) executors synchronized {
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/java/org/apache/linkis/manager/engineplugin/errorcode/EngineconnCoreErrorCodeSummary.java
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/java/org/apache/linkis/manager/engineplugin/errorcode/EngineconnCoreErrorCodeSummary.java
new file mode 100644
index 000000000..551fc1896
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/java/org/apache/linkis/manager/engineplugin/errorcode/EngineconnCoreErrorCodeSummary.java
@@ -0,0 +1,159 @@
+/*
+ * 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.manager.engineplugin.errorcode;
+
+public enum EngineconnCoreErrorCodeSummary {
+  FAILED_CREATE_ELR(
+      10001,
+      "Failed to createEngineConnLaunchRequest(未能创建EngineConnLaunchRequest)",
+      "Failed to createEngineConnLaunchRequest(未能创建EngineConnLaunchRequest)"),
+  ETL_REQUESTED(
+      10001,
+      "EngineTypeLabel are requested(请求 EngineTypeLabel)",
+      "EngineTypeLabel are requested(请求 EngineTypeLabel)"),
+  CANNOT_INSTANCE_ECE(
+      20000,
+      "Cannot instance EngineConnExecution(无法实例 EngineConnExecution)",
+      "Cannot instance EngineConnExecution(无法实例 EngineConnExecution)"),
+
+  CANNOT_DEFAULT_EF(
+      20000,
+      "Cannot find default ExecutorFactory(找不到默认的 ExecutorFactory)",
+      "Cannot find default ExecutorFactory(找不到默认的 ExecutorFactory)"),
+  ETL_NOT_EXISTS(
+      20000,
+      "EngineTypeLabel is not exists(EngineTypeLabel 不存在)",
+      "EngineTypeLabel is not exists(EngineTypeLabel 不存在)"),
+  UCL_NOT_EXISTS(
+      20000,
+      "UserCreatorLabel is not exists(UserCreatorLabel 不存在)",
+      "UserCreatorLabel is not exists(UserCreatorLabel 不存在)"),
+  CANNOT_HOME_PATH_EC(
+      20001,
+      "Cannot find the home path of engineConn(找不到engineConn的home路径)",
+      "Cannot find the home path of engineConn(找不到engineConn的home路径)"),
+  CANNOT_HOME_PATH_DIST(
+      20001,
+      "Cannot find the home path of engineconn dist(找不到 engineconn dist 
的home路径)",
+      "Cannot find the home path of engineconn dist(找不到 engineconn dist 
的home路径)"),
+  DIST_IS_EMPTY(
+      20001,
+      "The dist of EngineConn is empty,engineConnType(EngineConn 的 dist 
为空,engineConnType):",
+      "The dist of EngineConn is empty,engineConnType(EngineConn 的 dist 
为空,engineConnType):"),
+  DIST_IRREGULAR_EXIST(
+      20001,
+      "The dist of EngineConn is irregular, both the version dir and 
non-version dir are 
exist,engineConnType(EngineConn的dist是不规则的,版本目录和非版本目录都存在,engineConnType):",
+      "The dist of EngineConn is irregular, both the version dir and 
non-version dir are 
exist,engineConnType(EngineConn的dist是不规则的,版本目录和非版本目录都存在,engineConnType):"),
+  NO_PERMISSION_FILE(
+      20001,
+      "System have no permission to delete old engineConn 
file,File(系统无权删除旧的engineConn文件,File):",
+      "System have no permission to delete old engineConn 
file,File(系统无权删除旧的engineConn文件,File):"),
+  LIB_CONF_DIR_NECESSARY(
+      20001,
+      "The `lib` and `conf` dir is necessary in EngineConn 
dist,engineConnType(`lib` 和 `conf` 目录在 EngineConn dist 中是必需的,engineConnType):",
+      "The `lib` and `conf` dir is necessary in EngineConn 
dist,engineConnType(`lib` 和 `conf` 目录在 EngineConn dist 中是必需的,engineConnType):"),
+
+  NOT_SUPPORTED_EF(
+      20011,
+      "Not supported ExecutorFactory(不支持 ExecutorFactory)",
+      "Not supported ExecutorFactory(不支持 ExecutorFactory)"),
+  DERTL_CANNOT_NULL(
+      70101,
+      "DefaultEngineRunTypeLabel cannot be null(DefaultEngineRunTypeLabel 
不能为空)",
+      "DefaultEngineRunTypeLabel cannot be null(DefaultEngineRunTypeLabel 
不能为空)"),
+  CANNOT_GET_LABEL_KEY(
+      70102,
+      "Cannot get label key. labels (无法获取标签key,标签):",
+      "Cannot get label key. labels (无法获取标签key,标签):"),
+  MINRESOURCE_MAXRESOURCE_NO_SAME(
+      70103,
+      "The minResource {} is not the same with the maxResource(minResource {} 
与 maxResource 不同)",
+      "The minResource {} is not the same with the maxResource(minResource {} 
与 maxResource 不同)"),
+  FAILED_ENGINE_INSTANCE(
+      70062,
+      "Failed to init engine conn plugin instance(无法初始化引擎连接插件实例)",
+      "Failed to init engine conn plugin instance(无法初始化引擎连接插件实例)"),
+  NO_PUBLIC_CONSTRUCTOR(
+      70062,
+      "No public constructor in pluginClass(pluginClass 中没有公共构造函数)",
+      "No public constructor in pluginClass(pluginClass 中没有公共构造函数)"),
+
+  ILLEGAL_ARGUMENTS(
+      70062,
+      "Illegal arguments in constructor of pluginClass(pluginClass 
的构造函数中的非法参数)",
+      "Illegal arguments in constructor of pluginClass(pluginClass 
的构造函数中的非法参数)"),
+
+  UNABLE_PLUGINCLASS(
+      70062,
+      "Unable to construct pluginClass(无法构造pluginClass)",
+      "Unable to construct pluginClass(无法构造pluginClass)"),
+  UNABLE_CLASS(70062, "Unable to load class(无法加载类)", "Unable to load 
class(无法加载类)"),
+  PLUGIN_FAIL_TO_LOAD(70062, "", ""),
+  NO_PLUGIN_FOUND(
+      70063,
+      "No plugin found , please check your configuration(未找到插件,请检查您的配置)",
+      "No plugin found , please check your configuration(未找到插件,请检查您的配置)"),
+  PLUGIN_NOT_FOUND(70063, "", ""),
+  NO_WRITE_PERMISSION(
+      70064,
+      "Have no write permission to directory(对目录没有写权限)",
+      "Have no write permission to directory(对目录没有写权限)"),
+  PLUGIN_FAIL_TO_LOAD_RES(70064, "", "");
+
+  /** (errorCode)错误码 */
+  private int errorCode;
+  /** (errorDesc)错误描述 */
+  private String errorDesc;
+  /** Possible reasons for the error(错误可能出现的原因) */
+  private String comment;
+
+  EngineconnCoreErrorCodeSummary(int errorCode, String errorDesc, String 
comment) {
+    this.errorCode = errorCode;
+    this.errorDesc = errorDesc;
+    this.comment = comment;
+  }
+
+  public int getErrorCode() {
+    return errorCode;
+  }
+
+  public void setErrorCode(int errorCode) {
+    this.errorCode = errorCode;
+  }
+
+  public String getErrorDesc() {
+    return errorDesc;
+  }
+
+  public void setErrorDesc(String errorDesc) {
+    this.errorDesc = errorDesc;
+  }
+
+  public String getComment() {
+    return comment;
+  }
+
+  public void setComment(String comment) {
+    this.comment = comment;
+  }
+
+  @Override
+  public String toString() {
+    return "errorCode: " + this.errorCode + ", errorDesc:" + this.errorDesc;
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/creation/EngineConnFactory.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/creation/EngineConnFactory.scala
index 61cb8a6d9..d80fa626b 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/creation/EngineConnFactory.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/creation/EngineConnFactory.scala
@@ -21,6 +21,7 @@ import org.apache.linkis.common.utils.Logging
 import org.apache.linkis.engineconn.common.creation.EngineCreationContext
 import org.apache.linkis.engineconn.common.engineconn.{DefaultEngineConn, 
EngineConn}
 import 
org.apache.linkis.manager.engineplugin.common.exception.EngineConnBuildFailedException
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.Label
 import org.apache.linkis.manager.label.entity.engine.EngineConnModeLabel
 import org.apache.linkis.manager.label.entity.engine.EngineType.EngineType
@@ -71,7 +72,10 @@ trait MultiExecutorEngineConnFactory extends 
AbstractEngineConnFactory with Logg
     getExecutorFactories
       .find(_.getClass == getDefaultExecutorFactoryClass)
       .getOrElse(
-        throw new EngineConnBuildFailedException(20000, "Cannot find default 
ExecutorFactory.")
+        throw new EngineConnBuildFailedException(
+          CANNOT_DEFAULT_EF.getErrorCode,
+          CANNOT_DEFAULT_EF.getErrorDesc
+        )
       )
 
   protected def getDefaultExecutorFactoryClass: Class[_ <: ExecutorFactory]
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadException.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadException.scala
index c29d0550d..8852f5f54 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadException.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadException.scala
@@ -19,8 +19,9 @@ package 
org.apache.linkis.manager.engineplugin.common.exception
 
 import org.apache.linkis.common.exception.ErrorException
 import 
org.apache.linkis.manager.engineplugin.common.loader.conf.PluginLoaderConstant
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 class EngineConnPluginLoadException(desc: String, t: Throwable)
-    extends ErrorException(PluginLoaderConstant.PLUGIN_FAIL_TO_LOAD, desc) {
+    extends ErrorException(PLUGIN_FAIL_TO_LOAD.getErrorCode, desc) {
   super.initCause(t)
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadResourceException.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadResourceException.scala
index 087ea4937..6a59d8720 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadResourceException.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginLoadResourceException.scala
@@ -19,8 +19,9 @@ package 
org.apache.linkis.manager.engineplugin.common.exception
 
 import org.apache.linkis.common.exception.ErrorException
 import 
org.apache.linkis.manager.engineplugin.common.loader.conf.PluginLoaderConstant
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 class EngineConnPluginLoadResourceException(desc: String, t: Throwable)
-    extends ErrorException(PluginLoaderConstant.PLUGIN_FAIL_TO_LOAD_RES, desc) 
{
+    extends ErrorException(PLUGIN_FAIL_TO_LOAD_RES.getErrorCode, desc) {
   super.initCause(t)
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginNotFoundException.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginNotFoundException.scala
index 22e00df7e..7bd401ecc 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginNotFoundException.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/exception/EngineConnPluginNotFoundException.scala
@@ -19,9 +19,10 @@ package 
org.apache.linkis.manager.engineplugin.common.exception
 
 import org.apache.linkis.common.exception.ErrorException
 import 
org.apache.linkis.manager.engineplugin.common.loader.conf.PluginLoaderConstant
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 class EngineConnPluginNotFoundException(desc: String, t: Throwable)
-    extends ErrorException(PluginLoaderConstant.PLUGIN_NOT_FOUND, desc) {
+    extends ErrorException(PLUGIN_NOT_FOUND.getErrorCode, desc) {
   super.initCause(t)
 
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala
index 0c2d94d8e..497e160db 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/JavaProcessEngineConnLaunchBuilder.scala
@@ -28,6 +28,7 @@ import 
org.apache.linkis.manager.engineplugin.common.launch.entity.{
 }
 import 
org.apache.linkis.manager.engineplugin.common.launch.process.Environment.{variable,
 _}
 import 
org.apache.linkis.manager.engineplugin.common.launch.process.LaunchConstants._
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.engine.EngineTypeLabel
 
 import org.apache.commons.lang3.StringUtils
@@ -173,7 +174,12 @@ abstract class JavaProcessEngineConnLaunchBuilder
     val engineType = engineConnBuildRequest.labels.asScala
       .find(_.isInstanceOf[EngineTypeLabel])
       .map { case engineTypeLabel: EngineTypeLabel => engineTypeLabel }
-      .getOrElse(throw new EngineConnBuildFailedException(20000, 
"EngineTypeLabel is not exists."))
+      .getOrElse(
+        throw new EngineConnBuildFailedException(
+          ETL_NOT_EXISTS.getErrorCode,
+          ETL_NOT_EXISTS.getErrorDesc
+        )
+      )
     val engineConnResource = 
engineConnResourceGenerator.getEngineConnBMLResources(engineType)
     Array(
       engineConnResource.getConfBmlResource,
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/ProcessEngineConnLaunchBuilder.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/ProcessEngineConnLaunchBuilder.scala
index dff4c9eee..1a5905ac1 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/ProcessEngineConnLaunchBuilder.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/ProcessEngineConnLaunchBuilder.scala
@@ -17,12 +17,12 @@
 
 package org.apache.linkis.manager.engineplugin.common.launch.process
 
-import org.apache.linkis.engineconn.common.conf.EngineConnConf
 import org.apache.linkis.manager.common.protocol.bml.BmlResource
 import org.apache.linkis.manager.engineplugin.common.conf.EnvConfiguration
 import 
org.apache.linkis.manager.engineplugin.common.exception.EngineConnBuildFailedException
 import 
org.apache.linkis.manager.engineplugin.common.launch.EngineConnLaunchBuilder
 import org.apache.linkis.manager.engineplugin.common.launch.entity._
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.engine.UserCreatorLabel
 
 import java.util
@@ -81,7 +81,12 @@ trait ProcessEngineConnLaunchBuilder extends 
EngineConnLaunchBuilder {
           getMaxRetries
         )
       }
-      .getOrElse(throw new EngineConnBuildFailedException(20000, 
"UserCreatorLabel is not exists."))
+      .getOrElse(
+        throw new EngineConnBuildFailedException(
+          UCL_NOT_EXISTS.getErrorCode,
+          UCL_NOT_EXISTS.getErrorDesc
+        )
+      )
   }
 
   protected def getEngineStartUser(label: UserCreatorLabel): String = {
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadException.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadException.scala
index fbb92c686..4144aa3e3 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadException.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadException.scala
@@ -19,8 +19,9 @@ package 
org.apache.linkis.manager.engineplugin.common.loader.exception
 
 import org.apache.linkis.common.exception.ErrorException
 import 
org.apache.linkis.manager.engineplugin.common.loader.conf.PluginLoaderConstant
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 class EngineConnPluginLoadException(desc: String, t: Throwable)
-    extends ErrorException(PluginLoaderConstant.PLUGIN_FAIL_TO_LOAD, desc) {
+    extends ErrorException(PLUGIN_FAIL_TO_LOAD.getErrorCode, desc) {
   super.initCause(t)
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadResourceException.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadResourceException.scala
index 831294144..7486f186a 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadResourceException.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginLoadResourceException.scala
@@ -19,8 +19,9 @@ package 
org.apache.linkis.manager.engineplugin.common.loader.exception
 
 import org.apache.linkis.common.exception.ErrorException
 import 
org.apache.linkis.manager.engineplugin.common.loader.conf.PluginLoaderConstant
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 class EngineConnPluginLoadResourceException(desc: String, t: Throwable)
-    extends ErrorException(PluginLoaderConstant.PLUGIN_FAIL_TO_LOAD_RES, desc) 
{
+    extends ErrorException(PLUGIN_FAIL_TO_LOAD_RES.getErrorCode, desc) {
   super.initCause(t)
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginNotFoundException.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginNotFoundException.scala
index 665483a99..54e2b6cce 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginNotFoundException.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/loader/exception/EngineConnPluginNotFoundException.scala
@@ -19,9 +19,10 @@ package 
org.apache.linkis.manager.engineplugin.common.loader.exception
 
 import org.apache.linkis.common.exception.ErrorException
 import 
org.apache.linkis.manager.engineplugin.common.loader.conf.PluginLoaderConstant
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 class EngineConnPluginNotFoundException(desc: String, t: Throwable)
-    extends ErrorException(PluginLoaderConstant.PLUGIN_NOT_FOUND, desc) {
+    extends ErrorException(PLUGIN_NOT_FOUND.getErrorCode, desc) {
   super.initCause(t)
 
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/resource/AbstractEngineResourceFactory.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/resource/AbstractEngineResourceFactory.scala
index 963aca143..72bed44b3 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/resource/AbstractEngineResourceFactory.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/resource/AbstractEngineResourceFactory.scala
@@ -20,6 +20,7 @@ package org.apache.linkis.manager.engineplugin.common.resource
 import org.apache.linkis.manager.common.entity.resource.{NodeResource, 
Resource}
 import org.apache.linkis.manager.common.utils.ResourceUtils
 import 
org.apache.linkis.manager.engineplugin.common.exception.EngineConnPluginErrorException
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 trait AbstractEngineResourceFactory extends EngineResourceFactory {
 
@@ -38,7 +39,7 @@ trait AbstractEngineResourceFactory extends 
EngineResourceFactory {
     val maxResource = getMaxRequestResource(engineResourceRequest)
     if (minResource.getClass != maxResource.getClass) {
       throw new EngineConnPluginErrorException(
-        70103,
+        MINRESOURCE_MAXRESOURCE_NO_SAME.getErrorCode,
         s"The minResource ${minResource.getClass.getSimpleName} is not the 
same with the maxResource${maxResource.getClass.getSimpleName}."
       )
     }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/DefaultEngineConnPluginLoader.java
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/DefaultEngineConnPluginLoader.java
index ef7b1e865..a0b8b304b 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/DefaultEngineConnPluginLoader.java
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/DefaultEngineConnPluginLoader.java
@@ -46,6 +46,8 @@ import java.util.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary.*;
+
 public class DefaultEngineConnPluginLoader extends 
CacheablesEngineConnPluginLoader {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(DefaultEngineConnPluginLoader.class);
@@ -183,7 +185,7 @@ public class DefaultEngineConnPluginLoader extends 
CacheablesEngineConnPluginLoa
       // Only one method
       plugin.init(props);
     } catch (Exception e) {
-      throw new EngineConnPluginLoadException("Failed to init engine conn 
plugin instance", e);
+      throw new 
EngineConnPluginLoadException(FAILED_ENGINE_INSTANCE.getErrorDesc(), e);
     }
   }
 
@@ -217,7 +219,7 @@ public class DefaultEngineConnPluginLoader extends 
CacheablesEngineConnPluginLoa
       final Constructor<?>[] constructors = pluginClass.getConstructors();
       if (constructors.length == 0) {
         throw new EngineConnPluginLoadException(
-            "No public constructor in pluginClass [" + pluginClass.getName() + 
"]", null);
+            NO_PUBLIC_CONSTRUCTOR.getErrorDesc() + " [" + 
pluginClass.getName() + "]", null);
       }
       // Choose the first one
       Constructor<?> constructor = constructors[0];
@@ -229,15 +231,14 @@ public class DefaultEngineConnPluginLoader extends 
CacheablesEngineConnPluginLoa
           return (EngineConnPlugin) constructor.newInstance(props);
         } else {
           throw new EngineConnPluginLoadException(
-              "Illegal arguments in constructor of pluginClass [" + 
pluginClass.getName() + "]",
-              null);
+              ILLEGAL_ARGUMENTS.getErrorDesc() + " [" + pluginClass.getName() 
+ "]", null);
         }
       } catch (Exception e) {
         if (e instanceof EngineConnPluginLoadException) {
           throw (EngineConnPluginLoadException) e;
         }
         throw new EngineConnPluginLoadException(
-            "Unable to construct pluginClass [" + pluginClass.getName() + "]", 
null);
+            UNABLE_PLUGINCLASS.getErrorDesc() + " [" + pluginClass.getName() + 
"]", null);
       }
     } finally {
       Thread.currentThread().setContextClassLoader(storeClassLoader);
@@ -250,7 +251,8 @@ public class DefaultEngineConnPluginLoader extends 
CacheablesEngineConnPluginLoa
     try {
       return 
classLoader.loadClass(pluginClass).asSubclass(EngineConnPlugin.class);
     } catch (ClassNotFoundException e) {
-      throw new EngineConnPluginLoadException("Unable to load class:[" + 
pluginClass + "]", e);
+      throw new EngineConnPluginLoadException(
+          UNABLE_CLASS.getErrorDesc() + ":[" + pluginClass + "]", e);
     }
   }
 
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/resource/BmlEngineConnPluginResourceLoader.java
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/resource/BmlEngineConnPluginResourceLoader.java
index f934c234a..6fb44544b 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/resource/BmlEngineConnPluginResourceLoader.java
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/java/org/apache/linkis/engineplugin/loader/loaders/resource/BmlEngineConnPluginResourceLoader.java
@@ -43,6 +43,8 @@ import java.util.Map;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary.NO_WRITE_PERMISSION;
+
 public class BmlEngineConnPluginResourceLoader implements 
EngineConnPluginsResourceLoader {
 
   private static final Logger LOG =
@@ -140,7 +142,7 @@ public class BmlEngineConnPluginResourceLoader implements 
EngineConnPluginsResou
       }
       if (!parentFile.exists() || !parentFile.canWrite()) {
         throw new EngineConnPluginLoadResourceException(
-            "Have no write permission to directory:[" + 
parentFile.getAbsolutePath() + "]", null);
+            NO_WRITE_PERMISSION.getErrorDesc() + ":[" + 
parentFile.getAbsolutePath() + "]", null);
       }
       String tmpPath = parentFile.getAbsolutePath();
       if (!tmpPath.endsWith(String.valueOf(IOUtils.DIR_SEPARATOR))) {
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/AbstractEngineConnBmlResourceGenerator.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/AbstractEngineConnBmlResourceGenerator.scala
index 1304e1087..739bbddcf 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/AbstractEngineConnBmlResourceGenerator.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/AbstractEngineConnBmlResourceGenerator.scala
@@ -20,6 +20,7 @@ package org.apache.linkis.engineplugin.server.localize
 import 
org.apache.linkis.engineplugin.server.conf.EngineConnPluginConfiguration.ENGINE_CONN_HOME
 import 
org.apache.linkis.engineplugin.server.localize.EngineConnBmlResourceGenerator.NO_VERSION_MARK
 import 
org.apache.linkis.manager.engineplugin.common.exception.EngineConnPluginErrorException
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.engine.EngineTypeLabel
 import org.apache.linkis.server.conf.ServerConfiguration
 
@@ -32,8 +33,8 @@ abstract class AbstractEngineConnBmlResourceGenerator extends 
EngineConnBmlResou
 
   if (!new File(getEngineConnsHome).exists) {
     throw new EngineConnPluginErrorException(
-      20001,
-      s"Cannot find the home path(${getEngineConnsHome}) of engineConn."
+      CANNOT_HOME_PATH_EC.getErrorCode,
+      CANNOT_HOME_PATH_EC.getErrorDesc
     )
   }
 
@@ -48,8 +49,8 @@ abstract class AbstractEngineConnBmlResourceGenerator extends 
EngineConnBmlResou
     val engineConnDistHome = Paths.get(getEngineConnsHome, engineConnType, 
"dist").toFile.getPath
     if (!new File(engineConnDistHome).exists()) {
       throw new EngineConnPluginErrorException(
-        20001,
-        "Cannot find the home path of engineconn dist."
+        CANNOT_HOME_PATH_DIST.getErrorCode,
+        CANNOT_HOME_PATH_DIST.getErrorDesc
       )
     }
     if (StringUtils.isBlank(version) || NO_VERSION_MARK == version) return 
engineConnDistHome
@@ -63,15 +64,15 @@ abstract class AbstractEngineConnBmlResourceGenerator 
extends EngineConnBmlResou
     val engineConnDistHomeFile = new File(engineConnDistHome)
     if (!engineConnDistHomeFile.exists()) {
       throw new EngineConnPluginErrorException(
-        20001,
-        "Cannot find the home path of engineconn dist."
+        CANNOT_HOME_PATH_DIST.getErrorCode,
+        CANNOT_HOME_PATH_DIST.getErrorDesc
       )
     }
     val children = engineConnDistHomeFile.listFiles()
     if (children.isEmpty) {
       throw new EngineConnPluginErrorException(
-        20001,
-        s"The dist of ${engineConnType}EngineConn is empty."
+        DIST_IS_EMPTY.getErrorCode,
+        DIST_IS_EMPTY.getErrorDesc + s"${engineConnType}"
       )
     } else if (!children.exists(_.getName.startsWith("v"))) {
       Array(engineConnDistHome)
@@ -79,8 +80,8 @@ abstract class AbstractEngineConnBmlResourceGenerator extends 
EngineConnBmlResou
       children.map(_.getPath)
     } else {
       throw new EngineConnPluginErrorException(
-        20001,
-        s"The dist of ${engineConnType}EngineConn is irregular, both the 
version dir and non-version dir are exist."
+        DIST_IRREGULAR_EXIST.getErrorCode,
+        DIST_IRREGULAR_EXIST.getErrorDesc + s"${engineConnType}"
       )
     }
   }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/DefaultEngineConnBmlResourceGenerator.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/DefaultEngineConnBmlResourceGenerator.scala
index bf3be00e7..991fcf838 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/DefaultEngineConnBmlResourceGenerator.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/localize/DefaultEngineConnBmlResourceGenerator.scala
@@ -20,6 +20,7 @@ package org.apache.linkis.engineplugin.server.localize
 import org.apache.linkis.common.utils.{Logging, Utils, ZipUtils}
 import 
org.apache.linkis.engineplugin.server.localize.EngineConnBmlResourceGenerator.NO_VERSION_MARK
 import 
org.apache.linkis.manager.engineplugin.common.exception.EngineConnPluginErrorException
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 
 import java.io.{File, FileInputStream, InputStream}
 
@@ -68,8 +69,8 @@ class DefaultEngineConnBmlResourceGenerator
         val newFile = new File(path, file.getName + ".zip")
         if (newFile.exists() && !newFile.delete()) {
           throw new EngineConnPluginErrorException(
-            20001,
-            s"System have no permission to delete old engineConn file 
$newFile."
+            NO_PERMISSION_FILE.getErrorCode,
+            NO_PERMISSION_FILE.getErrorCode + s"$newFile"
           )
         }
         ZipUtils.fileToZip(file.getPath, path, file.getName + ".zip")
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnLaunchService.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnLaunchService.scala
index 2d131797f..78d653a2e 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnLaunchService.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnLaunchService.scala
@@ -29,6 +29,7 @@ import 
org.apache.linkis.manager.engineplugin.common.launch.process.{
   EngineConnResourceGenerator,
   JavaProcessEngineConnLaunchBuilder
 }
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.manager.label.entity.engine.EngineTypeLabel
 import org.apache.linkis.rpc.message.annotation.Receiver
 
@@ -72,12 +73,15 @@ class DefaultEngineConnLaunchService extends 
EngineConnLaunchService with Loggin
             t
           )
           throw new EngineConnPluginErrorException(
-            10001,
-            s"Failed to createEngineConnLaunchRequest, 
${ExceptionUtils.getRootCauseMessage(t)}"
+            FAILED_CREATE_ELR.getErrorCode,
+            FAILED_CREATE_ELR.getErrorDesc + s", 
${ExceptionUtils.getRootCauseMessage(t)}"
           )
       }
     } else {
-      throw new EngineConnPluginErrorException(10001, "EngineTypeLabel are 
requested")
+      throw new EngineConnPluginErrorException(
+        ETL_REQUESTED.getErrorCode,
+        ETL_REQUESTED.getErrorDesc
+      )
     }
   }
 
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceFactoryService.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceFactoryService.scala
index e4943ba9f..49ac236c5 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceFactoryService.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceFactoryService.scala
@@ -25,6 +25,7 @@ import 
org.apache.linkis.manager.engineplugin.common.resource.{
   EngineResourceFactory,
   EngineResourceRequest
 }
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary.ETL_REQUESTED
 import org.apache.linkis.manager.label.entity.engine.EngineTypeLabel
 import org.apache.linkis.rpc.message.annotation.Receiver
 
@@ -53,7 +54,10 @@ class DefaultEngineConnResourceFactoryService
       val engineTypeLabel = engineTypeOption.get.asInstanceOf[EngineTypeLabel]
       
getResourceFactoryBy(engineTypeLabel).createEngineResource(engineResourceRequest)
     } else {
-      throw new EngineConnPluginErrorException(10001, "EngineTypeLabel are 
requested")
+      throw new EngineConnPluginErrorException(
+        ETL_REQUESTED.getErrorCode,
+        ETL_REQUESTED.getErrorDesc
+      )
     }
   }
 
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceService.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceService.scala
index 0823ef6fc..c99c95a68 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceService.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-server/src/main/scala/org/apache/linkis/engineplugin/server/service/DefaultEngineConnResourceService.scala
@@ -33,6 +33,7 @@ import 
org.apache.linkis.manager.engineplugin.common.launch.process.{
   EngineConnResource,
   LaunchConstants
 }
+import 
org.apache.linkis.manager.engineplugin.errorcode.EngineconnCoreErrorCodeSummary._
 import org.apache.linkis.rpc.message.annotation.Receiver
 
 import org.apache.commons.lang3.StringUtils
@@ -174,8 +175,8 @@ class DefaultEngineConnResourceService extends 
EngineConnResourceService with Lo
         ) < 2
     ) {
       throw new EngineConnPluginErrorException(
-        20001,
-        s"The `lib` and `conf` dir is necessary in ${engineConnType}EngineConn 
dist."
+        LIB_CONF_DIR_NECESSARY.getErrorCode,
+        LIB_CONF_DIR_NECESSARY.getErrorDesc + s"${engineConnType}"
       )
     }
     localize.foreach { localizeResource =>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to