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 2022/03/05 09:04:26 UTC

[incubator-linkis] 13/18: Add missing license header.

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

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

commit 8124f4af2e34226d8e4597647a71ecd26c0051a1
Author: alexkun <xu...@qq.com>
AuthorDate: Fri Mar 4 21:15:22 2022 +0800

    Add missing license header.
---
 .../service/TaskExecutionServiceImpl.scala         |  5 ++--
 .../access/ECTaskEntranceInfoAccessTest.java       |  1 +
 .../src/test/resources/linkis.properties           | 14 +++++++++++
 .../access/ECTaskEntranceInfoAccessHelper.scala    | 28 ++++++++++++++++++----
 4 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala
index d9bcf32..407892e 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala
+++ b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/main/scala/org/apache/linkis/engineconn/computation/executor/service/TaskExecutionServiceImpl.scala
@@ -18,8 +18,8 @@
 package org.apache.linkis.engineconn.computation.executor.service
 
 import com.google.common.cache.{Cache, CacheBuilder}
-import org.apache.commons.lang.StringUtils
-import org.apache.commons.lang.exception.ExceptionUtils
+import org.apache.commons.lang3.StringUtils
+import org.apache.commons.lang3.exception.ExceptionUtils
 import org.apache.linkis.common.listener.Event
 import org.apache.linkis.common.utils.{Logging, Utils}
 import org.apache.linkis.engineconn.acessible.executor.listener.LogListener
@@ -33,6 +33,7 @@ import org.apache.linkis.engineconn.computation.executor.entity.{CommonEngineCon
 import org.apache.linkis.engineconn.computation.executor.execute.{ComputationExecutor, ConcurrentComputationExecutor}
 import org.apache.linkis.engineconn.computation.executor.hook.ExecutorLabelsRestHook
 import org.apache.linkis.engineconn.computation.executor.listener.{ResultSetListener, TaskProgressListener, TaskStatusListener}
+import org.apache.linkis.engineconn.computation.executor.upstream.event.TaskStatusChangedForUpstreamMonitorEvent
 import org.apache.linkis.engineconn.computation.executor.utlis.{ComputationEngineConstant, ComputationEngineUtils}
 import org.apache.linkis.engineconn.core.executor.ExecutorManager
 import org.apache.linkis.engineconn.executor.entity.ResourceFetchExecutor
diff --git a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/java/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessTest.java b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/java/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessTest.java
index 1123a7e..51de963 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/java/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessTest.java
+++ b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/java/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessTest.java
@@ -1,3 +1,4 @@
+
 package org.apache.linkis.engineconn.computation.executor.upstream.access;
 
 import org.apache.linkis.DataWorkCloudApplication;
diff --git a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/resources/linkis.properties b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/resources/linkis.properties
index 3e242fc..138ea16 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/resources/linkis.properties
+++ b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/resources/linkis.properties
@@ -1,3 +1,17 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 wds.linkis.server.mybatis.mapperLocations=classpath*:com/webank/wedatasphere/linkis/jobhistory/scan/app/jobhistory/dao/impl/*.xml
 wds.linkis.server.mybatis.typeAliasesPackage=org.apache.linkis.jobhistory.scan.app.jobhistory.entity
 wds.linkis.server.mybatis.BasePackage=org.apache.linkis.jobhistory.scan.app.jobhistory.dao
diff --git a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/scala/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessHelper.scala b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/scala/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessHelper.scala
index a7fcdfe..da3fa7f 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/scala/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessHelper.scala
+++ b/linkis-computation-governance/linkis-engineconn/linkis-computation-engineconn/src/test/scala/org/apache/linkis/engineconn/computation/executor/upstream/access/ECTaskEntranceInfoAccessHelper.scala
@@ -1,6 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.linkis.engineconn.computation.executor.upstream.access
 
-import org.apache.commons.lang.StringUtils
+import org.apache.commons.lang3.StringUtils
 import org.apache.linkis.DataWorkCloudApplication
 import org.apache.linkis.common.ServiceInstance
 import org.apache.linkis.common.conf.{CommonVars, DWCArgumentsParser}
@@ -14,6 +31,7 @@ import org.apache.linkis.manager.engineplugin.common.launch.process.Environment
 import org.apache.linkis.manager.label.builder.factory.{LabelBuilderFactory, LabelBuilderFactoryContext}
 import org.apache.linkis.manager.label.entity.Label
 import org.apache.linkis.server.conf.ServerConfiguration
+import java.util
 
 import scala.collection.mutable.ArrayBuffer
 
@@ -30,16 +48,16 @@ object ECTaskEntranceInfoAccessHelper {
     val host = CommonVars(Environment.ECM_HOST.toString, "127.0.0.1").getValue
     val port = CommonVars(Environment.ECM_PORT.toString, "80").getValue
     engineCreationContext.setEMInstance(ServiceInstance(GovernanceCommonConf.ENGINE_CONN_MANAGER_SPRING_NAME.getValue, s"$host:$port"))
-    val labels = new ArrayBuffer[Label[_]]
+    val labels = new util.ArrayList[Label[_]]
     val labelArgs = engineConf.filter(_._1.startsWith(EngineConnArgumentsParser.LABEL_PREFIX))
     if (labelArgs.nonEmpty) {
       labelArgs.foreach { case (key, value) =>
-        labels += labelBuilderFactory.createLabel[Label[_]](key.replace(EngineConnArgumentsParser.LABEL_PREFIX, ""), value)
+        labels.add(labelBuilderFactory.createLabel[Label[_]](key.replace(EngineConnArgumentsParser.LABEL_PREFIX, ""), value))
       }
-      engineCreationContext.setLabels(labels.toList)
+      engineCreationContext.setLabels(labels)
     }
     val jMap = new java.util.HashMap[String, String](engineConf.size)
-    jMap.putAll(engineConf)
+    engineConf.foreach(kv => jMap.put(kv._1, kv._2))
     engineCreationContext.setOptions(jMap)
     engineCreationContext.setArgs(args)
     //    EngineConnObject.setEngineCreationContext(engineCreationContext)

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