From a7a4301f17aecef08c35fc3c13a9b8e69f98d3fd Mon Sep 17 00:00:00 2001 From: aiceflower Date: Tue, 12 Sep 2023 18:24:00 +0800 Subject: [PATCH] Dev 1.1.15 webank hive (#289) * fix hive bug * code format --- .../scala/org/apache/linkis/rpc/conf/RPCConfiguration.scala | 2 +- .../rm/service/impl/DriverAndYarnReqResourceService.scala | 6 +++--- .../manager/rm/utils/AcrossClusterRulesJudgeUtils.scala | 4 ++-- .../apache/linkis/filesystem/restful/api/FsRestfulApi.java | 3 ++- .../org/apache/linkis/gateway/parser/GatewayParser.scala | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) 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 d2dc6b1cc3..80a1f4c6ca 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 @@ -66,7 +66,7 @@ object RPCConfiguration { ).getValue.split(",") val METADATAQUERY_SERVICE_APPLICATION_NAME: CommonVars[String] = - CommonVars("wds.linkis.gateway.conf.publicservice.name", "linkis-ps-metadataquery") + CommonVars("wds.linkis.gateway.conf.metadataquery.name", "linkis-ps-metadataquery") val METADATAQUERY_SERVICE_LIST: Array[String] = CommonVars( "wds.linkis.gateway.conf.metadataquery.list", diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/impl/DriverAndYarnReqResourceService.scala b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/impl/DriverAndYarnReqResourceService.scala index 9a3b214318..b934c4123d 100644 --- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/impl/DriverAndYarnReqResourceService.scala +++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/service/impl/DriverAndYarnReqResourceService.scala @@ -114,9 +114,9 @@ class DriverAndYarnReqResourceService( } catch { case ex: Exception => throw new RMWarnException( - RMErrorCode.ACROSS_CLUSTER_RULE_FAILED.getErrorCode, - ex.getMessage - ) + RMErrorCode.ACROSS_CLUSTER_RULE_FAILED.getErrorCode, + ex.getMessage + ) } logger.info(s"user: $user, creator: $creator task meet the threshold rule") diff --git a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/utils/AcrossClusterRulesJudgeUtils.scala b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/utils/AcrossClusterRulesJudgeUtils.scala index 76fc176395..805785299d 100644 --- a/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/utils/AcrossClusterRulesJudgeUtils.scala +++ b/linkis-computation-governance/linkis-manager/linkis-application-manager/src/main/scala/org/apache/linkis/manager/rm/utils/AcrossClusterRulesJudgeUtils.scala @@ -50,8 +50,8 @@ object AcrossClusterRulesJudgeUtils extends Logging { } else { throw new RMWarnException( RMErrorCode.ACROSS_CLUSTER_RULE_FAILED.getErrorCode, - s"usedCPUPercentage: $usedCPUPercentage, CPUPercentageThreshold: $CPUPercentageThreshold" + - s"usedMemoryPercentage: $usedMemoryPercentage, MemoryPercentageThreshold: $MemoryPercentageThreshold" + s"usedCPUPercentage: $usedCPUPercentage, CPUPercentageThreshold: $CPUPercentageThreshold" + + s"usedMemoryPercentage: $usedMemoryPercentage, MemoryPercentageThreshold: $MemoryPercentageThreshold" ) } } else { diff --git a/linkis-public-enhancements/linkis-script-dev/linkis-storage-script-dev-server/src/main/java/org/apache/linkis/filesystem/restful/api/FsRestfulApi.java b/linkis-public-enhancements/linkis-script-dev/linkis-storage-script-dev-server/src/main/java/org/apache/linkis/filesystem/restful/api/FsRestfulApi.java index fa0d1d86b6..6364e65873 100644 --- a/linkis-public-enhancements/linkis-script-dev/linkis-storage-script-dev-server/src/main/java/org/apache/linkis/filesystem/restful/api/FsRestfulApi.java +++ b/linkis-public-enhancements/linkis-script-dev/linkis-storage-script-dev-server/src/main/java/org/apache/linkis/filesystem/restful/api/FsRestfulApi.java @@ -93,7 +93,8 @@ public class FsRestfulApi { */ private boolean checkIsUsersDirectory(String requestPath, String userName, Boolean withAdmin) { // 配置文件默认关闭检查,withadmin默认true,特殊情况传false 开启权限检查( - // The configuration file defaults to disable checking, with admin defaulting to true, and in special cases, false is passed to enable permission checking) + // The configuration file defaults to disable checking, with admin defaulting to true, and in + // special cases, false is passed to enable permission checking) boolean ownerCheck = WorkSpaceConfiguration.FILESYSTEM_PATH_CHECK_OWNER.getValue(); if (!ownerCheck && withAdmin) { LOGGER.debug("not check filesystem owner."); diff --git a/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/parser/GatewayParser.scala b/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/parser/GatewayParser.scala index bf56e10498..fae7bb3e36 100644 --- a/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/parser/GatewayParser.scala +++ b/linkis-spring-cloud-services/linkis-service-gateway/linkis-gateway-core/src/main/scala/org/apache/linkis/gateway/parser/GatewayParser.scala @@ -128,13 +128,13 @@ class DefaultGatewayParser(gatewayParsers: Array[GatewayParser]) extends Abstrac ) { RPCConfiguration.PUBLIC_SERVICE_APPLICATION_NAME.getValue // In order to be compatible with metadata module name refactoring,this logic will be removed in subsequent versions + } else if (RPCConfiguration.LINKIS_DATASOURCE_SERVICE_LIST.contains(serviceId)) { + RPCConfiguration.LINKIS_DATASOURCE_SERVICE_NAME.getValue } else if (RPCConfiguration.METADATAQUERY_SERVICE_LIST.contains(serviceId)) { RPCConfiguration.METADATAQUERY_SERVICE_APPLICATION_NAME.getValue } else if (RPCConfiguration.LINKIS_MANAGER_SERVICE_LIST.contains(serviceId)) { RPCConfiguration.LINKIS_MANAGER_SERVICE_NAME.getValue // After the complete merge is completed, it needs to be removed - } else if (RPCConfiguration.LINKIS_DATASOURCE_SERVICE_LIST.contains(serviceId)) { - RPCConfiguration.LINKIS_DATASOURCE_SERVICE_NAME.getValue } else { serviceId }