This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.1.3 by this push:
new 734fd7332 Fix the issue that the JDBC Engine console configuration
cannot take effect immediately after modification (#2142)
734fd7332 is described below
commit 734fd7332286875e4c19688403f5022cef1e8b41
Author: huiyuanjjjjuice <[email protected]>
AuthorDate: Mon May 23 11:54:54 2022 +0800
Fix the issue that the JDBC Engine console configuration cannot take effect
immediately after modification (#2142)
---
.../src/main/scala/org/apache/linkis/rpc/conf/RPCConfiguration.scala | 1 +
.../apache/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala | 3 ++-
.../jdbc/src/main/resources/linkis-engineconn.properties | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
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 fafc5a2f4..c50280ec4 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
@@ -54,4 +54,5 @@ object RPCConfiguration {
val REFLECTIONS = new Reflections(SERVICE_SCAN_PACKAGE, new
MethodAnnotationsScanner(), new TypeAnnotationsScanner(), new SubTypesScanner())
+ val BDP_RPC_CACHE_CONF_EXPIRE_TIME =
CommonVars("wds.linkis.rpc.cache.expire.time", 120000L)
}
diff --git
a/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala
b/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala
index fc9bc9277..5f5fa7147 100644
---
a/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala
+++
b/linkis-commons/linkis-rpc/src/main/scala/org/apache/linkis/rpc/interceptor/common/CacheableRPCInterceptor.scala
@@ -23,6 +23,7 @@ import com.google.common.cache.{Cache, CacheBuilder,
RemovalListener, RemovalNot
import org.apache.linkis.common.exception.WarnException
import org.apache.linkis.common.utils.{Logging, Utils}
import org.apache.linkis.protocol.CacheableProtocol
+import org.apache.linkis.rpc.conf.RPCConfiguration
import org.apache.linkis.rpc.interceptor.{RPCInterceptor, RPCInterceptorChain,
RPCInterceptorExchange}
import org.springframework.stereotype.Component
import org.springframework.util.StringUtils
@@ -33,7 +34,7 @@ import scala.tools.scalap.scalax.util.StringUtil
class CacheableRPCInterceptor extends RPCInterceptor with Logging{
private val guavaCache: Cache[Any, Any] =
CacheBuilder.newBuilder().concurrencyLevel(5)
- .expireAfterAccess(120000, TimeUnit.MILLISECONDS).initialCapacity(20)
//TODO Make parameters(做成参数)
+
.expireAfterAccess(RPCConfiguration.BDP_RPC_CACHE_CONF_EXPIRE_TIME.getValue,
TimeUnit.MILLISECONDS).initialCapacity(20) //TODO Make parameters(做成参数)
.maximumSize(1000).recordStats().removalListener(new RemovalListener[Any,
Any] {
override def onRemoval(removalNotification: RemovalNotification[Any,
Any]): Unit = {
debug(s"CacheSender removed key => ${removalNotification.getKey}, value
=> ${removalNotification.getValue}.")
diff --git
a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/resources/linkis-engineconn.properties
b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/resources/linkis-engineconn.properties
index 27b484920..9d83f372f 100644
---
a/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/resources/linkis-engineconn.properties
+++
b/linkis-engineconn-plugins/engineconn-plugins/jdbc/src/main/resources/linkis-engineconn.properties
@@ -20,3 +20,4 @@ wds.linkis.engineconn.debug.enable=true
wds.linkis.engineconn.plugin.default.class=org.apache.linkis.manager.engineplugin.jdbc.JDBCEngineConnPlugin
#wds.linkis.engine.io.opts=" -Dfile.encoding=UTF-8
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=49100 "
wds.linkis.engineconn.support.parallelism=true
+wds.linkis.rpc.cache.expire.time=0
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]