diff --git a/linkis-commons/linkis-common/pom.xml b/linkis-commons/linkis-common/pom.xml index 425c0673d2..35631fbab6 100644 --- a/linkis-commons/linkis-common/pom.xml +++ b/linkis-commons/linkis-common/pom.xml @@ -124,6 +124,11 @@ 1.10 + + org.springframework.boot + spring-boot-actuator + + org.reflections reflections diff --git a/linkis-commons/linkis-rpc/src/main/java/org/apache/linkis/rpc/errorcode/LinkisRpcErrorCodeSummary.java b/linkis-commons/linkis-rpc/src/main/java/org/apache/linkis/rpc/errorcode/LinkisRpcErrorCodeSummary.java index e7a0851e49..5aabaccea2 100644 --- a/linkis-commons/linkis-rpc/src/main/java/org/apache/linkis/rpc/errorcode/LinkisRpcErrorCodeSummary.java +++ b/linkis-commons/linkis-rpc/src/main/java/org/apache/linkis/rpc/errorcode/LinkisRpcErrorCodeSummary.java @@ -29,8 +29,7 @@ public enum LinkisRpcErrorCodeSummary implements LinkisErrorCode { CORRESPONDING_TO_INITIALIZE( 10004, "The corresponding anti-sequence class:{0} failed to initialize(对应的反序列类:{0} 初始化失败)"), CORRESPONDING_CLASS_ILLEGAL( - 10005, - "The corresponding anti-sequence class:{0} is illegal (对应的反序列类:{0} 不合法)"), + 10005, "The corresponding anti-sequence class:{0} is illegal (对应的反序列类:{0} 不合法)"), APPLICATION_IS_NOT_EXISTS( 10051, "The instance:{0} of application {1} does not exist(应用程序:{0} 的实例:{1} 不存在)."), diff --git a/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/conf/RPCConfiguration.scala b/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/conf/RPCConfiguration.scala index 5c93babbc0..2a4e00a9e6 100644 --- a/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/conf/RPCConfiguration.scala +++ b/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/conf/RPCConfiguration.scala @@ -148,4 +148,5 @@ object RPCConfiguration { val ENABLE_RPC_OBJECT_PREFIX_WHITE_LIST_CHECK: Boolean = CommonVars("wds.linkis.rpc.object.class.prefix.whitelist.check.enable", true).getValue + } diff --git a/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/transform/RPCConsumer.scala b/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/transform/RPCConsumer.scala index 2e9e681828..ed422b18e0 100644 --- a/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/transform/RPCConsumer.scala +++ b/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/transform/RPCConsumer.scala @@ -20,15 +20,17 @@ package org.apache.linkis.rpc.transform import org.apache.linkis.common.exception.ExceptionManager import org.apache.linkis.common.utils.Utils import org.apache.linkis.rpc.conf.RPCConfiguration +import org.apache.linkis.rpc.errorcode.LinkisRpcErrorCodeSummary.CORRESPONDING_CLASS_ILLEGAL import org.apache.linkis.rpc.errorcode.LinkisRpcErrorCodeSummary.CORRESPONDING_NOT_FOUND import org.apache.linkis.rpc.errorcode.LinkisRpcErrorCodeSummary.CORRESPONDING_TO_INITIALIZE -import org.apache.linkis.rpc.errorcode.LinkisRpcErrorCodeSummary.CORRESPONDING_CLASS_ILLEGAL import org.apache.linkis.rpc.exception.DWCURIException import org.apache.linkis.rpc.serializer.ProtostuffSerializeUtil import org.apache.linkis.server.{EXCEPTION_MSG, JMap, Message} import java.text.MessageFormat + import scala.runtime.BoxedUnit + import org.slf4j.LoggerFactory private[linkis] trait RPCConsumer { @@ -51,7 +53,10 @@ private[linkis] object RPCConsumer { val objectStr = data.get(OBJECT_VALUE).toString val objectClass = data.get(CLASS_VALUE).toString logger.debug("The corresponding anti-sequence is class {}", objectClass) - if (RPCConfiguration.ENABLE_RPC_OBJECT_PREFIX_WHITE_LIST_CHECK && !RPCConfiguration.RPC_OBJECT_PREFIX_WHITE_LIST.exists(prefix => objectClass.startsWith(prefix))) { + if ( + RPCConfiguration.ENABLE_RPC_OBJECT_PREFIX_WHITE_LIST_CHECK && !RPCConfiguration.RPC_OBJECT_PREFIX_WHITE_LIST + .exists(prefix => objectClass.startsWith(prefix)) + ) { throw new DWCURIException( CORRESPONDING_CLASS_ILLEGAL.getErrorCode, MessageFormat.format(CORRESPONDING_CLASS_ILLEGAL.getErrorDesc, objectClass) diff --git a/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/ResultSetAction.scala b/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/ResultSetAction.scala index bbc483069a..481617bceb 100644 --- a/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/ResultSetAction.scala +++ b/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/ResultSetAction.scala @@ -81,12 +81,12 @@ object ResultSetAction { this.columnPage = columnPage this } + def setColumnPageSize(columnPageSize: Int): Builder = { this.columnPageSize = columnPageSize this } - def build(): ResultSetAction = { if (user == null) throw new UJESClientBuilderException("user is needed!") if (path == null) throw new UJESClientBuilderException("path is needed!") @@ -97,8 +97,6 @@ object ResultSetAction { resultSetAction.setParameter("charset", charset) resultSetAction.setParameter("enableLimit", enableLimit) resultSetAction.setParameter("nullValue", nullValue) - resultSetAction.setParameter("columnPage", columnPage) - resultSetAction.setParameter("columnPageSize", columnPageSize) resultSetAction.setUser(user) resultSetAction } diff --git a/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/src/main/assembly/distribution.xml b/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/src/main/assembly/distribution.xml index da4e71662b..f24c7e21a1 100644 --- a/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/src/main/assembly/distribution.xml +++ b/linkis-computation-governance/linkis-engineconn-manager/linkis-engineconn-manager-server/src/main/assembly/distribution.xml @@ -244,9 +244,6 @@ org.slf4j:jul-to-slf4j:jar org.slf4j:slf4j-api:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-computation-governance/linkis-entrance/src/main/assembly/distribution.xml b/linkis-computation-governance/linkis-entrance/src/main/assembly/distribution.xml index 313506fd08..306cb71fdb 100644 --- a/linkis-computation-governance/linkis-entrance/src/main/assembly/distribution.xml +++ b/linkis-computation-governance/linkis-entrance/src/main/assembly/distribution.xml @@ -245,9 +245,6 @@ org.slf4j:jul-to-slf4j:jar org.slf4j:slf4j-api:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/am/service/engine/DefaultEngineCreateService.scala b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/am/service/engine/DefaultEngineCreateService.scala index 8f7207a7f1..8cfb53e77e 100644 --- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/am/service/engine/DefaultEngineCreateService.scala +++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/am/service/engine/DefaultEngineCreateService.scala @@ -17,6 +17,7 @@ package org.apache.linkis.manager.am.service.engine +import org.apache.commons.lang3.StringUtils import org.apache.linkis.common.ServiceInstance import org.apache.linkis.common.exception.LinkisRetryException import org.apache.linkis.common.utils.{ByteTimeUtils, Logging, Utils} @@ -25,10 +26,6 @@ import org.apache.linkis.governance.common.conf.GovernanceCommonConf import org.apache.linkis.governance.common.conf.GovernanceCommonConf.ENGINE_CONN_MANAGER_SPRING_NAME import org.apache.linkis.governance.common.utils.JobUtils import org.apache.linkis.manager.am.conf.{AMConfiguration, EngineConnConfigurationService} -import org.apache.linkis.manager.am.conf.AMConfiguration.{ - HIVE_CLUSTER_EC_EXECUTE_ONCE_RULE_ENABLE, - SUPPORT_CLUSTER_RULE_EC_TYPES -} import org.apache.linkis.manager.am.exception.AMErrorException import org.apache.linkis.manager.am.label.EngineReuseLabelChooser import org.apache.linkis.manager.am.selector.{ECAvailableRule, NodeSelector} @@ -39,34 +36,26 @@ import org.apache.linkis.manager.common.entity.node.{EMNode, EngineNode} import org.apache.linkis.manager.common.entity.resource.NodeResource import org.apache.linkis.manager.common.protocol.engine.{EngineCreateRequest, EngineStopRequest} import org.apache.linkis.manager.common.utils.ManagerUtils -import org.apache.linkis.manager.engineplugin.common.launch.entity.{ - EngineConnBuildRequestImpl, - EngineConnCreationDescImpl -} +import org.apache.linkis.manager.engineplugin.common.launch.entity.{EngineConnBuildRequestImpl, EngineConnCreationDescImpl} import org.apache.linkis.manager.engineplugin.common.resource.TimeoutEngineResourceRequest import org.apache.linkis.manager.label.builder.factory.LabelBuilderFactoryContext -import org.apache.linkis.manager.label.entity.{EngineNodeLabel, Label} import org.apache.linkis.manager.label.entity.engine.EngineTypeLabel -import org.apache.linkis.manager.label.entity.entrance.ExecuteOnceLabel import org.apache.linkis.manager.label.entity.node.AliasServiceInstanceLabel +import org.apache.linkis.manager.label.entity.{EngineNodeLabel, Label} import org.apache.linkis.manager.label.service.{NodeLabelService, UserLabelService} -import org.apache.linkis.manager.label.utils.{LabelUtil, LabelUtils} +import org.apache.linkis.manager.label.utils.LabelUtils import org.apache.linkis.manager.persistence.NodeMetricManagerPersistence -import org.apache.linkis.manager.rm.{AvailableResource, NotEnoughResource} import org.apache.linkis.manager.rm.service.ResourceManager +import org.apache.linkis.manager.rm.{AvailableResource, NotEnoughResource} import org.apache.linkis.manager.service.common.label.{LabelChecker, LabelFilter} import org.apache.linkis.rpc.Sender import org.apache.linkis.rpc.message.annotation.Receiver import org.apache.linkis.server.BDPJettyServerHelper - -import org.apache.commons.lang3.StringUtils - import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Service import java.util -import java.util.concurrent.{TimeoutException, TimeUnit} - +import java.util.concurrent.{TimeUnit, TimeoutException} import scala.collection.JavaConverters._ import scala.concurrent.duration.Duration diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/RequestResourceService.scala b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/RequestResourceService.scala index 1bbd81f905..1e3f8c1c37 100644 --- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/RequestResourceService.scala +++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/RequestResourceService.scala @@ -178,13 +178,14 @@ abstract class RequestResourceService(labelResourceService: LabelResourceService if (props != null) { acrossClusterTask = props.getOrDefault(AMConfiguration.ACROSS_CLUSTER_TASK, "false").toBoolean } + // hive cluster check if ( externalResourceService != null && StringUtils.isNotBlank( engineType ) && SUPPORT_CLUSTER_RULE_EC_TYPES.contains( engineType - ) && props != null && acrossClusterTask + ) && props != null && acrossClusterTask && !"spark".equals(engineType) ) { val queueName = props.getOrDefault(YARN_QUEUE_NAME_CONFIG_KEY, "default") logger.info(s"hive cluster check with queue: $queueName") diff --git a/linkis-engineconn-plugins/flink/src/main/assembly/distribution.xml b/linkis-engineconn-plugins/flink/src/main/assembly/distribution.xml index cca20280a2..8be049c640 100644 --- a/linkis-engineconn-plugins/flink/src/main/assembly/distribution.xml +++ b/linkis-engineconn-plugins/flink/src/main/assembly/distribution.xml @@ -138,9 +138,6 @@ org.scala-lang:*:jar org.slf4j:*:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-engineconn-plugins/sqoop/src/main/assembly/distribution.xml b/linkis-engineconn-plugins/sqoop/src/main/assembly/distribution.xml index 9d96ad8023..c62a729b9c 100644 --- a/linkis-engineconn-plugins/sqoop/src/main/assembly/distribution.xml +++ b/linkis-engineconn-plugins/sqoop/src/main/assembly/distribution.xml @@ -245,9 +245,6 @@ org.slf4j:jul-to-slf4j:jar org.slf4j:slf4j-api:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-extensions/linkis-et-monitor/src/main/assembly/distribution.xml b/linkis-extensions/linkis-et-monitor/src/main/assembly/distribution.xml index e606ed79f2..462d7be9f8 100644 --- a/linkis-extensions/linkis-et-monitor/src/main/assembly/distribution.xml +++ b/linkis-extensions/linkis-et-monitor/src/main/assembly/distribution.xml @@ -245,9 +245,6 @@ org.slf4j:jul-to-slf4j:jar org.slf4j:slf4j-api:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-public-enhancements/distribution.xml b/linkis-public-enhancements/distribution.xml index 0ac5bf5f8c..6f506821db 100644 --- a/linkis-public-enhancements/distribution.xml +++ b/linkis-public-enhancements/distribution.xml @@ -243,9 +243,6 @@ org.slf4j:jul-to-slf4j:jar org.slf4j:slf4j-api:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/condition/construction/ContextValueTypeConditionParser.java b/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/condition/construction/ContextValueTypeConditionParser.java index 4dba6afdff..23908b7821 100644 --- a/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/condition/construction/ContextValueTypeConditionParser.java +++ b/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/condition/construction/ContextValueTypeConditionParser.java @@ -17,15 +17,16 @@ package org.apache.linkis.cs.condition.construction; -import org.apache.commons.lang3.StringUtils; import org.apache.linkis.cs.condition.Condition; import org.apache.linkis.cs.condition.impl.ContextValueTypeCondition; +import org.apache.linkis.cs.conf.CSConfiguration; + +import org.apache.commons.lang3.StringUtils; import java.util.Arrays; import java.util.List; import java.util.Map; -import org.apache.linkis.cs.conf.CSConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,10 +42,10 @@ public Condition parse(Map conditionMap) { try { String valueType = (String) conditionMap.get("contextValueType"); List contextValueTypeWhiteList = - Arrays.asList(CSConfiguration.CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST.getValue() - .split(",")); + Arrays.asList(CSConfiguration.CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST.getValue().split(",")); if (CSConfiguration.ENABLE_CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST_CHECK.getValue()) { - if (contextValueTypeWhiteList.stream().anyMatch(ele -> StringUtils.startsWith(valueType, ele))) { + if (contextValueTypeWhiteList.stream() + .anyMatch(ele -> StringUtils.startsWith(valueType, ele))) { contextValueType = Class.forName(valueType); } else { logger.error("ContextValueType: {} is illegal", valueType); diff --git a/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/conf/CSConfiguration.java b/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/conf/CSConfiguration.java index cdb7049ca1..61c33b87a2 100644 --- a/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/conf/CSConfiguration.java +++ b/linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/conf/CSConfiguration.java @@ -1,11 +1,28 @@ +/* + * 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.cs.conf; import org.apache.linkis.common.conf.CommonVars; public class CSConfiguration { - public static final CommonVars CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST = - CommonVars.apply("linkis.context.value.type.prefix.whitelist", "org.apache.linkis"); + public static final CommonVars CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST = + CommonVars.apply("linkis.context.value.type.prefix.whitelist", "org.apache.linkis"); - public static final CommonVars ENABLE_CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST_CHECK = - CommonVars.apply("linkis.context.value.type.prefix.whitelist.check.enable", true); + public static final CommonVars ENABLE_CONTEXT_VALUE_TYPE_PREFIX_WHITE_LIST_CHECK = + CommonVars.apply("linkis.context.value.type.prefix.whitelist.check.enable", true); } diff --git a/linkis-public-enhancements/linkis-datasource/linkis-datasource-manager/server/src/main/assembly/distribution.xml b/linkis-public-enhancements/linkis-datasource/linkis-datasource-manager/server/src/main/assembly/distribution.xml index ec03bb0f03..82de57eda3 100644 --- a/linkis-public-enhancements/linkis-datasource/linkis-datasource-manager/server/src/main/assembly/distribution.xml +++ b/linkis-public-enhancements/linkis-datasource/linkis-datasource-manager/server/src/main/assembly/distribution.xml @@ -140,9 +140,6 @@ org.scala-lang:*:jar org.slf4j:*:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/src/main/assembly/distribution.xml b/linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/src/main/assembly/distribution.xml index f722478d42..727da52c7e 100644 --- a/linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/src/main/assembly/distribution.xml +++ b/linkis-spring-cloud-services/linkis-service-discovery/linkis-eureka/src/main/assembly/distribution.xml @@ -111,9 +111,6 @@ org.springframework:spring-aop:jar org.springframework:spring-beans:jar org.springframework.boot:spring-boot:jar - org.springframework.boot:spring-boot-actuator:jar - org.springframework.boot:spring-boot-actuator-autoconfigure:jar - org.springframework.boot:spring-boot-autoconfigure:jar org.springframework.boot:spring-boot-starter:jar org.springframework.boot:spring-boot-starter-actuator:jar org.springframework.boot:spring-boot-starter-aop:jar diff --git a/pom.xml b/pom.xml index 6bb0bdfd17..690092fb47 100644 --- a/pom.xml +++ b/pom.xml @@ -1036,7 +1036,11 @@ pom import - + + org.springframework.boot + spring-boot-actuator + ${spring.boot.version} +