You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by al...@apache.org on 2022/04/11 06:40:27 UTC

[incubator-linkis] branch dev-1.1.2 updated: Modify the python engine to not load pyspark functions #1906 (#1931)

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

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


The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
     new 3b370cfce Modify the python engine to not load pyspark functions #1906 (#1931)
3b370cfce is described below

commit 3b370cfced186c3bf24ab16397202da795afef6d
Author: peacewong <wp...@gmail.com>
AuthorDate: Mon Apr 11 14:40:22 2022 +0800

    Modify the python engine to not load pyspark functions #1906 (#1931)
---
 .../executor/hook/executor/FunctionExecutorHook.scala       | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/hook/executor/FunctionExecutorHook.scala b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/hook/executor/FunctionExecutorHook.scala
index 15d126d7e..7d0630f92 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/hook/executor/FunctionExecutorHook.scala
+++ b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/hook/executor/FunctionExecutorHook.scala
@@ -34,22 +34,15 @@ class PyFunctionEngineHook extends UDFLoad with ExecutorHook {
     "%py\n" + readFile(udfInfo.getCreateUser, udfInfo.getBmlResourceId, udfInfo.getBmlResourceVersion)
   }
 
-  override protected def getRealRunType(runTypeIn: String): RunType = {
-    if (runTypeIn.equals("python")) {
-      return RunType.PYTHON
-    }
-    runType
-  }
-
   override def getHookName(): String = "PyFunctionEngineHook"
 
   override def afterExecutorInit(executor: Executor): Unit = {
-    logger.info("start to register python function ")
+    logger.info("start to register pyspark function ")
     loadFunctions(executor)
-    logger.info("Finished to register python function ")
+    logger.info("Finished to register pyspark function ")
   }
 
-  override def isAccepted(codeType: String): Boolean = runType.toString.equalsIgnoreCase(codeType) || RunType.PYTHON.toString.equalsIgnoreCase(codeType)
+  override def isAccepted(codeType: String): Boolean = runType.toString.equalsIgnoreCase(codeType)
 }
 
 


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