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/08/05 06:46:50 UTC

[incubator-linkis] branch dev-1.2.0 updated: ES engine code optimization and NoSuchMethodError bug fix (#2600)

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

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


The following commit(s) were added to refs/heads/dev-1.2.0 by this push:
     new 926b56a8d ES engine  code optimization and NoSuchMethodError bug fix (#2600)
926b56a8d is described below

commit 926b56a8dfc3b7ee687641d45a23300add741460
Author: aiceflower <ki...@sina.com>
AuthorDate: Fri Aug 5 14:46:45 2022 +0800

    ES engine  code optimization and NoSuchMethodError bug fix (#2600)
    
    * Code optimization: Remove white space at both ends of the string
    * add openlookeng,trino,elasticsearch judgement
---
 .../org/apache/linkis/manager/label/entity/engine/EngineType.scala   | 5 ++++-
 .../engineplugin/elasticsearch/executer/client/EsClientFactory.scala | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineType.scala b/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineType.scala
index e26a73275..6ef1cc45a 100644
--- a/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineType.scala
+++ b/linkis-computation-governance/linkis-manager/linkis-label-common/src/main/java/org/apache/linkis/manager/label/entity/engine/EngineType.scala
@@ -27,7 +27,7 @@ object EngineType extends Enumeration with Logging {
 
   val SPARK = Value("spark")
 
-  val HIVE  = Value("hive")
+  val HIVE = Value("hive")
 
   val PYTHON = Value("python")
 
@@ -92,6 +92,9 @@ object EngineType extends Enumeration with Logging {
     case _ if APPCONN.toString.equals(str) => APPCONN
     case _ if SQOOP.toString.equalsIgnoreCase(str) => SQOOP
     case _ if DATAX.toString.equalsIgnoreCase(str) => DATAX
+    case _ if OPENLOOKENG.toString.equalsIgnoreCase(str) => OPENLOOKENG
+    case _ if TRINO.toString.equalsIgnoreCase(str) => TRINO
+    case _ if ELASTICSEARCH.toString.equalsIgnoreCase(str) => ELASTICSEARCH
     case _ => null
 
   }
diff --git a/linkis-engineconn-plugins/elasticsearch/src/main/scala/org/apache/linkis/engineplugin/elasticsearch/executer/client/EsClientFactory.scala b/linkis-engineconn-plugins/elasticsearch/src/main/scala/org/apache/linkis/engineplugin/elasticsearch/executer/client/EsClientFactory.scala
index d547cdebc..463d2f2d3 100644
--- a/linkis-engineconn-plugins/elasticsearch/src/main/scala/org/apache/linkis/engineplugin/elasticsearch/executer/client/EsClientFactory.scala
+++ b/linkis-engineconn-plugins/elasticsearch/src/main/scala/org/apache/linkis/engineplugin/elasticsearch/executer/client/EsClientFactory.scala
@@ -139,7 +139,7 @@ object EsClientFactory {
     clusterStr.split(",")
       .map(value => {
         val arr = value.split(":")
-        (arr(0), arr(1).toInt)
+        (arr(0).trim, arr(1).trim.toInt)
       })
   } else Array()
 


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