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

casion pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/master by this push:
     new dba44dd289 In the engineConnExec.sh script, replace the absolute path 
of CLASSPATH with a variable (#5276)
dba44dd289 is described below

commit dba44dd2891935d37be4a80943a47f4bc559d0e8
Author: LiuGuoHua <[email protected]>
AuthorDate: Tue Oct 28 10:36:33 2025 +0800

    In the engineConnExec.sh script, replace the absolute path of CLASSPATH 
with a variable (#5276)
---
 .../apache/linkis/ecm/core/launch/ProcessEngineConnLaunch.scala    | 1 +
 .../linkis/manager/engineplugin/common/conf/EnvConfiguration.scala | 6 ++----
 .../manager/engineplugin/common/launch/process/Environment.scala   | 6 +++---
 .../common/launch/process/JavaProcessEngineConnLaunchBuilder.scala | 7 +++++--
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git 
a/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-core/src/main/scala/org/apache/linkis/ecm/core/launch/ProcessEngineConnLaunch.scala
 
b/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-core/src/main/scala/org/apache/linkis/ecm/core/launch/ProcessEngineConnLaunch.scala
index 2a466cc208..ba914dbbba 100644
--- 
a/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-core/src/main/scala/org/apache/linkis/ecm/core/launch/ProcessEngineConnLaunch.scala
+++ 
b/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-core/src/main/scala/org/apache/linkis/ecm/core/launch/ProcessEngineConnLaunch.scala
@@ -119,6 +119,7 @@ trait ProcessEngineConnLaunch extends EngineConnLaunch with 
Logging {
         environment.put(PREFER_IP_ADDRESS.toString, 
Configuration.PREFER_IP_ADDRESS.toString)
       case ENGINECONN_ENVKEYS =>
         environment.put(ENGINECONN_ENVKEYS.toString, 
GovernanceCommonConf.ENGINECONN_ENVKEYS)
+      case LINKIS_HOME => putIfExists(LINKIS_HOME)
       case _ =>
     }
   }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/conf/EnvConfiguration.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/conf/EnvConfiguration.scala
index f0bae00a1b..7689ae94af 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/conf/EnvConfiguration.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/conf/EnvConfiguration.scala
@@ -74,10 +74,8 @@ object EnvConfiguration {
 
   val LOG4J2_XML_FILE = 
CommonVars[String]("wds.linkis.engineconn.log4j2.xml.file", "log4j2.xml")
 
-  val LINKIS_PUBLIC_MODULE_PATH = CommonVars(
-    "wds.linkis.public_module.path",
-    Configuration.getLinkisHome + "/lib/linkis-commons/public-module"
-  )
+  val LINKIS_PUBLIC_MODULE_PATH =
+    CommonVars("wds.linkis.public_module.path", 
"/lib/linkis-commons/public-module")
 
   val LINKIS_CONF_DIR = CommonVars("LINKIS_CONF_DIR", 
Configuration.getLinkisHome() + "/conf")
 }
diff --git 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/Environment.scala
 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/Environment.scala
index c273876b1d..f7ef3691dd 100644
--- 
a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/Environment.scala
+++ 
b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-plugin-core/src/main/scala/org/apache/linkis/manager/engineplugin/common/launch/process/Environment.scala
@@ -23,9 +23,9 @@ object Environment extends Enumeration {
 
   type Environment = Value
 
-  val USER, ECM_HOME, PWD, PATH, SHELL, JAVA_HOME, CLASSPATH, HADOOP_HOME, 
HADOOP_CONF_DIR,
-      HIVE_CONF_DIR, LOG_DIRS, TEMP_DIRS, ECM_HOST, ECM_PORT, RANDOM_PORT, 
SERVICE_DISCOVERY,
-      PREFER_IP_ADDRESS, UDF_JARS, ENGINECONN_ENVKEYS = Value
+  val USER, ECM_HOME, PWD, PATH, SHELL, JAVA_HOME, LINKIS_HOME, CLASSPATH, 
HADOOP_HOME,
+      HADOOP_CONF_DIR, HIVE_CONF_DIR, LOG_DIRS, TEMP_DIRS, ECM_HOST, ECM_PORT, 
RANDOM_PORT,
+      SERVICE_DISCOVERY, PREFER_IP_ADDRESS, UDF_JARS, ENGINECONN_ENVKEYS = 
Value
 
   def variable(environment: Environment): String =
     LaunchConstants.EXPANSION_MARKER_LEFT + environment + 
LaunchConstants.EXPANSION_MARKER_RIGHT
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 e46126523a..5a47f662b9 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
@@ -119,12 +119,15 @@ abstract class JavaProcessEngineConnLaunchBuilder
     // first, add engineconn conf dirs.
     addPathToClassPath(environment, buildPath(Seq(variable(PWD), 
ENGINE_CONN_CONF_DIR_NAME)))
     // then, add LINKIS_CONF_DIR conf dirs.
-    addPathToClassPath(environment, 
buildPath(Seq(EnvConfiguration.LINKIS_CONF_DIR.getValue)))
+    addPathToClassPath(environment, buildPath(Seq(variable(LINKIS_HOME), 
"conf")))
     // then, add engineconn libs.
     addPathToClassPath(environment, buildPath(Seq(variable(PWD), 
ENGINE_CONN_LIB_DIR_NAME + "/*")))
     // then, add public modules.
     if (!enablePublicModule) {
-      addPathToClassPath(environment, 
buildPath(Seq(LINKIS_PUBLIC_MODULE_PATH.getValue + "/*")))
+      addPathToClassPath(
+        environment,
+        buildPath(Seq(variable(LINKIS_HOME), 
LINKIS_PUBLIC_MODULE_PATH.getValue + "/*"))
+      )
     }
     // finally, add the suitable properties key to classpath
     val taskClassPathFiles = 
EnvConfiguration.ENGINE_CONN_CLASSPATH_FILES.getValue(


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

Reply via email to