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/03/01 08:07:33 UTC

[linkis] branch dev-1.3.2 updated: [bugfix] when executor is shutdown, the status is complete that send to linkismanager (#4272)

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

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


The following commit(s) were added to refs/heads/dev-1.3.2 by this push:
     new a8d34e115 [bugfix] when executor is shutdown, the status is complete that send to linkismanager (#4272)
a8d34e115 is described below

commit a8d34e11589030b169f35fdbc523ba0ff54184d7
Author: 人生有如两个橘子 <15...@163.com>
AuthorDate: Wed Mar 1 16:07:24 2023 +0800

    [bugfix] when executor is shutdown, the status is complete that send to linkismanager (#4272)
    
    This close #4271
---
 .../acessible/executor/service/DefaultAccessibleService.scala | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/service/DefaultAccessibleService.scala b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/service/DefaultAccessibleService.scala
index 7d86a8e3e..d07d16ce2 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/service/DefaultAccessibleService.scala
+++ b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/service/DefaultAccessibleService.scala
@@ -92,15 +92,12 @@ class DefaultAccessibleService extends AccessibleService with Logging {
       return
     }
     var executor: Executor = ExecutorManager.getInstance.getReportExecutor
-    if (null != executor) {
-      Utils.tryAndWarn {
-        executor.close()
-        executor.tryShutdown()
-      }
-      logger.warn(s"Engine : ${Sender.getThisInstance} with state has stopped successfully.")
-    } else {
+    if (null == executor) {
       executor = SensibleExecutor.getDefaultErrorSensibleExecutor
     }
+    Utils.tryAndWarn(executor.tryShutdown())
+    logger.warn(s"Engine : ${Sender.getThisInstance} with state has stopped successfully.")
+
     ExecutorManager.getInstance.getExecutors.foreach { closeExecutor =>
       Utils.tryAndWarn(closeExecutor.close())
       logger.warn(s"executorShutDownHook  start to close executor... $executor")


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