You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by al...@apache.org on 2022/02/18 03:34:27 UTC

[incubator-linkis] branch dev-1.1.0-datasource updated (9641def -> 7f09b8a)

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

alexkun pushed a change to branch dev-1.1.0-datasource
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git.


    from 9641def  fix:apache#1358 (#1469)
     new 5fee761  Fix issue #1507
     new 7f09b8a  0.5 converts to 30m

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 linkis-commons/linkis-module/pom.xml               |  7 --
 .../apache/linkis/server/conf/Knife4jConfig.scala  | 91 ----------------------
 .../conf/AccessibleExecutorConfiguration.scala     |  2 +-
 3 files changed, 1 insertion(+), 99 deletions(-)
 delete mode 100644 linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/conf/Knife4jConfig.scala

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


[incubator-linkis] 01/02: Fix issue #1507

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5fee7615d59804119cf0dc549ba222302f07ac03
Author: peacewong <wp...@gmail.com>
AuthorDate: Fri Feb 18 11:00:18 2022 +0800

    Fix issue #1507
---
 linkis-commons/linkis-module/pom.xml               |  7 --
 .../apache/linkis/server/conf/Knife4jConfig.scala  | 91 ----------------------
 2 files changed, 98 deletions(-)

diff --git a/linkis-commons/linkis-module/pom.xml b/linkis-commons/linkis-module/pom.xml
index 6a7c50b..7318362 100644
--- a/linkis-commons/linkis-module/pom.xml
+++ b/linkis-commons/linkis-module/pom.xml
@@ -30,13 +30,6 @@
     <artifactId>linkis-module</artifactId>
 
     <dependencies>
-        <!--add knif2 dependency-->
-        <dependency>
-              <groupId>com.github.xiaoymin</groupId>
-              <artifactId>knife4j-spring-boot-starter</artifactId>
-              <version>${knife4j.version}</version>
-        </dependency>
-
 
         <dependency>
             <groupId>org.apache.linkis</groupId>
diff --git a/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/conf/Knife4jConfig.scala b/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/conf/Knife4jConfig.scala
deleted file mode 100644
index b6ee259..0000000
--- a/linkis-commons/linkis-module/src/main/scala/org/apache/linkis/server/conf/Knife4jConfig.scala
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.server.conf
-
-import org.springframework.context.annotation.Bean
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
-import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j
-import org.springframework.context.annotation.Bean
-import org.springframework.context.annotation.Configuration
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
-import org.springframework.web.servlet.config.annotation.ViewControllerRegistry
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
-import springfox.documentation.builders.ApiInfoBuilder
-import springfox.documentation.builders.PathSelectors
-import springfox.documentation.builders.RequestHandlerSelectors
-import springfox.documentation.service.ApiInfo
-import springfox.documentation.spi.DocumentationType
-import springfox.documentation.spring.web.plugins.Docket
-import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
-import org.springframework.beans.factory.annotation.Value
-
-/**
- * it is very easy to enable knife when you want to use apiDoc(based on swagger2)
- * you can follow these steps to enable
- * 1, open application-linkis.yml and set knife4j.production=false
- * 2, open linkis.properties and set wds.linkis.test.mode=true ## it will be renamed as linkis.test.mode in future release
- * 3, restart the service and you can visit http://ip:port/api/rest_j/v1/doc.html
- *
- * or you can use apidoc by following steps  without enable wds.linkis.test.mode
- * 1, open application-linkis.yml and set knife4j.production=false
- * 2, open linkis.propertes ,and set wds.linkis.server.user.restful.uri.pass.auth=/api/rest_j/v1/doc.html,/api/rest_j/v1/swagger-resources,/api/rest_j/v1/webjars,/api/rest_j/v1/v2/api-docs
- * 3, restart the service and you can visit http://ip:port/api/rest_j/v1/doc.html
- * 4, in your browser,add dataworkcloud_inner_request=true, bdp-user-ticket-id's value and  workspaceId's value into cookie
- */
-@EnableSwagger2WebMvc
-@EnableKnife4j
-@Configuration
-class Knife4jConfig extends WebMvcConfigurer {
-
-  @Value("${spring.application.name}") private val appName = "linkis service"
-
-  @Bean(Array("defaultApi2"))
-  def  defaultApi2() : Docket = {
-     val docket = new Docket(DocumentationType.SWAGGER_2)
-      .apiInfo(apiInfo())
-      //分组名称
-      .groupName("RESTAPI")
-      .select()
-      //这里指定Controller扫描包路径
-      .apis(RequestHandlerSelectors.basePackage("org.apache.linkis"))
-      .paths(PathSelectors.any())
-      .build()
-    docket
-  }
-
-  def  apiInfo() : ApiInfo ={
-    val apiInfo = new ApiInfoBuilder()
-      .title(appName)
-      .description("Linkis micro service RESTful APIs")
-      .version("v1")
-      .build()
-    apiInfo
-  }
-
-  override def addResourceHandlers( registry : ResourceHandlerRegistry): Unit  =  {
-    registry.addResourceHandler("/api/rest_j/v1/doc.html**").addResourceLocations("classpath:/META-INF/resources/doc.html")
-    registry.addResourceHandler("/api/rest_j/v1/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/")
-  }
-
-  override def addViewControllers(registry : ViewControllerRegistry ) : Unit = {
-    registry.addRedirectViewController("/api/rest_j/v1/v2/api-docs", "/v2/api-docs")
-    registry.addRedirectViewController("/api/rest_j/v1/swagger-resources/configuration/ui", "/swagger-resources/configuration/ui")
-    registry.addRedirectViewController("/api/rest_j/v1/swagger-resources/configuration/security", "/swagger-resources/configuration/security")
-    registry.addRedirectViewController("/api/rest_j/v1/swagger-resources", "/swagger-resources")
-  }
-}

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


[incubator-linkis] 02/02: 0.5 converts to 30m

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7f09b8a6091b1664c150f4463c091f120f32ef98
Author: peacewong <wp...@gmail.com>
AuthorDate: Fri Feb 18 11:01:22 2022 +0800

    0.5 converts to 30m
---
 .../acessible/executor/conf/AccessibleExecutorConfiguration.scala       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/conf/AccessibleExecutorConfiguration.scala b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/conf/AccessibleExecutorConfiguration.scala
index feed3d1..27a38f7 100644
--- a/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/conf/AccessibleExecutorConfiguration.scala
+++ b/linkis-computation-governance/linkis-engineconn/linkis-engineconn-executor/accessible-executor/src/main/scala/org/apache/linkis/engineconn/acessible/executor/conf/AccessibleExecutorConfiguration.scala
@@ -35,7 +35,7 @@ object AccessibleExecutorConfiguration {
   val ENGINECONN_LOG_SEND_SIZE = CommonVars[Int]("wds.linkis.engineconn.log.send.cache.size", 5)
 
 
-  val ENGINECONN_MAX_FREE_TIME = CommonVars("wds.linkis.engineconn.max.free.time", new TimeType("0.5h"))
+  val ENGINECONN_MAX_FREE_TIME = CommonVars("wds.linkis.engineconn.max.free.time", new TimeType("30m"))
 
   val ENGINECONN_LOCK_CHECK_INTERVAL = CommonVars("wds.linkis.engineconn.lock.free.interval", new TimeType("3m"))
 

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