You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2022/09/05 15:18:34 UTC

[incubator-linkis] branch dev-1.3.0 updated: change word GageWay to Gateway (#3233)

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

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


The following commit(s) were added to refs/heads/dev-1.3.0 by this push:
     new 75fe35a07 change word GageWay to Gateway (#3233)
75fe35a07 is described below

commit 75fe35a07e8e12bdbb6d035a7fcddf9ae2e6720c
Author: zhaoyun006 <27...@qq.com>
AuthorDate: Mon Sep 5 23:18:28 2022 +0800

    change word GageWay to Gateway (#3233)
---
 .../engineplugin/python/executor/PythonEngineConnExecutor.scala   | 2 +-
 .../manager/engineplugin/python/executor/PythonSession.scala      | 2 +-
 .../linkis/engineplugin/spark/executor/SparkPythonExecutor.scala  | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonEngineConnExecutor.scala b/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonEngineConnExecutor.scala
index 1232a0dc5..e8a0c823f 100644
--- a/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonEngineConnExecutor.scala
+++ b/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonEngineConnExecutor.scala
@@ -80,7 +80,7 @@ class PythonEngineConnExecutor(id: Int, pythonSession: PythonSession, outputPrin
       s" System getProperties python.version = > ${System.getProperties.getProperty("python.version")}"
     )
     // System.getProperties.put("python.application.pyFiles", engineExecutionContext.getProperties.getOrDefault("python.application.pyFiles", "file:///mnt/bdap/test/test/test.zip").toString)
-    pythonSession.lazyInitGageWay()
+    pythonSession.lazyInitGateway()
     if (engineExecutionContext != this.engineExecutionContext) {
       this.engineExecutionContext = engineExecutionContext
       pythonSession.setEngineExecutionContext(engineExecutionContext)
diff --git a/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala b/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
index 653d0612e..c5990b504 100644
--- a/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
+++ b/linkis-engineconn-plugins/python/src/main/scala/org/apache/linkis/manager/engineplugin/python/executor/PythonSession.scala
@@ -152,7 +152,7 @@ class PythonSession extends Logging {
     )
   }
 
-  def lazyInitGageWay(): Unit = {
+  def lazyInitGateway(): Unit = {
     if (process == null) synchronized {
       if (process == null) {
         Utils.tryThrow(initGateway) { t =>
diff --git a/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala b/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
index f2719343f..500aaf561 100644
--- a/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
+++ b/linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/executor/SparkPythonExecutor.scala
@@ -259,12 +259,12 @@ class SparkPythonExecutor(val sparkEngineSession: SparkEngineSession, val id: In
       lineOutputStream.ready()
       //      info("Spark scala executor reset new engineExecutorContext!")
     }
-    lazyInitGageWay()
+    lazyInitGateway()
     this.jobGroup = jobGroup
     executeLine(code)
   }
 
-  def lazyInitGageWay(): Unit = {
+  def lazyInitGateway(): Unit = {
     if (process == null) {
       Utils.tryThrow(initGateway) { t =>
         {
@@ -302,13 +302,13 @@ class SparkPythonExecutor(val sparkEngineSession: SparkEngineSession, val id: In
     Await.result(promise.future, Duration.Inf)
     lineOutputStream.flush()
     val outStr = lineOutputStream.toString()
-    if (outStr.length > 0) {
+    if (outStr.nonEmpty) {
       val output = Utils.tryQuietly(
         ResultSetWriter
           .getRecordByRes(outStr, SparkConfiguration.SPARK_CONSOLE_OUTPUT_NUM.getValue)
       )
       val res = if (output != null) output.map(x => x.toString).toList.mkString("\n") else ""
-      if (res.length > 0) {
+      if (res.nonEmpty) {
         engineExecutionContext.appendStdout(s"result is $res")
       }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org