You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2023/06/28 10:07:13 UTC
[linkis] branch master updated: [optimize] empty params print (#4702)
This is an automated email from the ASF dual-hosted git repository.
peacewong 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 f3a6a07ec [optimize] empty params print (#4702)
f3a6a07ec is described below
commit f3a6a07ecf2329eef1b011260170c710c3e8744f
Author: ahaoyao <12...@users.noreply.github.com>
AuthorDate: Wed Jun 28 18:07:07 2023 +0800
[optimize] empty params print (#4702)
* empty params print
* empty params print
---
.../ecm/core/launch/ProcessEngineConnLaunch.scala | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 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 39b6b1e55..b6a4bee0a 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
@@ -42,6 +42,7 @@ import org.apache.commons.lang3.StringUtils
import java.io.{File, InputStream, OutputStream}
import scala.collection.JavaConverters._
+import scala.collection.mutable
trait ProcessEngineConnLaunch extends EngineConnLaunch with Logging {
@@ -151,15 +152,19 @@ trait ProcessEngineConnLaunch extends EngineConnLaunch with Logging {
def getPid(): Option[String] = None
protected def getCommandArgs: Array[String] = {
- if (
- request.creationDesc.properties.asScala.exists { case (k, v) =>
- k.contains(" ") || (v != null && v.contains(" "))
- }
- ) {
+ val recordMap: mutable.Map[String, String] = mutable.Map()
+ request.creationDesc.properties.asScala.foreach { case (k, v) =>
+ if (k.contains(" ") || (v != null && v.contains(" "))) recordMap.put(k, v)
+ }
+ if (recordMap.size > 0) {
+ val keyAndValue = new StringBuilder
+ for (kv <- recordMap) {
+ keyAndValue.append(s"${kv._1}->${kv._2};")
+ }
throw new ErrorException(
30000,
- "Startup parameters contain spaces!(启动参数中包含空格!)"
- ) // TODO exception
+ s"Startup parameters contain spaces! The key and value values of all its parameters are(启动参数中包含空格!其所有参数的key和value值分别为):${keyAndValue.toString()}"
+ )
}
val arguments = EngineConnArgumentsBuilder.newBuilder()
engineConnPort = PortUtils
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org