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/05/05 11:34:24 UTC
[incubator-linkis] 03/05: Add ec type judgment
This is an automated email from the ASF dual-hosted git repository.
casion pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
commit e03a1933a646e9ff6b350153239112db15c7f00a
Author: peacewong <wp...@gmail.com>
AuthorDate: Fri Apr 29 16:44:11 2022 +0800
Add ec type judgment
---
.../configuration/service/impl/ConfigKeyServiceImpl.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/linkis-public-enhancements/linkis-publicservice/linkis-configuration/src/main/java/org/apache/linkis/configuration/service/impl/ConfigKeyServiceImpl.java b/linkis-public-enhancements/linkis-publicservice/linkis-configuration/src/main/java/org/apache/linkis/configuration/service/impl/ConfigKeyServiceImpl.java
index 8f3314294..08987373d 100644
--- a/linkis-public-enhancements/linkis-publicservice/linkis-configuration/src/main/java/org/apache/linkis/configuration/service/impl/ConfigKeyServiceImpl.java
+++ b/linkis-public-enhancements/linkis-publicservice/linkis-configuration/src/main/java/org/apache/linkis/configuration/service/impl/ConfigKeyServiceImpl.java
@@ -30,10 +30,12 @@ import org.apache.linkis.configuration.util.LabelParameterParser;
import org.apache.linkis.manager.label.builder.CombinedLabelBuilder;
import org.apache.linkis.manager.label.entity.CombinedLabel;
import org.apache.linkis.manager.label.entity.Label;
+import org.apache.linkis.manager.label.entity.engine.EngineTypeLabel;
import org.apache.linkis.manager.label.exception.LabelErrorException;
import org.apache.commons.lang3.StringUtils;
+import org.apache.linkis.manager.label.utils.LabelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -69,7 +71,13 @@ public class ConfigKeyServiceImpl implements ConfigKeyService {
throw new ConfigurationException("config key not exists: " + configKeyValue.getKey());
}
ConfigKey configKey = configKeys.get(0);
-
+ EngineTypeLabel engineTypeLabel = LabelUtil.getEngineTypeLabel(labelList);
+ for (ConfigKey key:configKeys) {
+ if (engineTypeLabel.getEngineType().equalsIgnoreCase(key.getEngineType())) {
+ logger.info("config key:{} will be use engineType {}", key.getKey(),key.getEngineType());
+ configKey = key;
+ }
+ }
CombinedLabel combinedLabel = getCombinedLabel(labelList);
ConfigLabel configLabel =
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org