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 2023/06/29 06:12:08 UTC
[linkis] 03/06: A single executor engine type should not create multiple executors #4713
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
commit aafd9942fae740f52971382938f7ff54ba47a633
Author: peacewong <wp...@gmail.com>
AuthorDate: Tue Jun 27 22:16:22 2023 +0800
A single executor engine type should not create multiple executors #4713
---
.../org/apache/linkis/engineconn/core/executor/ExecutorManager.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
index f758b129e..e6dabe73e 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
+++ b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-core/src/main/scala/org/apache/linkis/engineconn/core/executor/ExecutorManager.scala
@@ -171,7 +171,10 @@ class LabelExecutorManagerImpl extends LabelExecutorManager with Logging {
MessageFormat.format(CANNOT_GET_LABEL_KEY.getErrorDesc, GSON.toJson(labels))
)
}
-
+ if (!executors.isEmpty && factories.size <= 1) {
+ logger.info("For a single Executor EC, if an Executor exists, it will be returned directly")
+ return getReportExecutor.asInstanceOf[LabelExecutor]
+ }
if (!executors.containsKey(labelKey)) executors synchronized {
if (!executors.containsKey(labelKey)) {
val executor = tryCreateExecutor(engineCreationContext, labels)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org