This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 73d0fd43af2ad4fa3ae7830341a0e7d96a349ee5 Author: Zhong <nju_y...@apache.org> AuthorDate: Thu Oct 18 21:40:27 2018 +0800 KYLIN-2898 config memcached --- .../org/apache/kylin/common/KylinConfigBase.java | 4 ++++ server/src/main/resources/applicationContext.xml | 28 ++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 159137b..9066b0d 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -1457,6 +1457,10 @@ abstract public class KylinConfigBase implements Serializable { return Boolean.parseBoolean(this.getOptional("kylin.query.ignore-unknown-function", FALSE)); } + public String getMemCachedHosts() { + return getRequired("kylin.cache.memcached.hosts"); + } + public String getQueryAccessController() { return getOptional("kylin.query.access-controller", null); } diff --git a/server/src/main/resources/applicationContext.xml b/server/src/main/resources/applicationContext.xml index c39ec5b..523fdc2 100644 --- a/server/src/main/resources/applicationContext.xml +++ b/server/src/main/resources/applicationContext.xml @@ -16,7 +16,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" - xmlns:task="http://www.springframework.org/schema/task" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:cache="http://www.springframework.org/schema/cache" xmlns:p="http://www.springframework.org/schema/p" @@ -24,8 +23,8 @@ http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd - http://www.springframework.org/schema/task - http://www.springframework.org/schema/task/spring-task-4.3.xsd + + http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd http://www.springframework.org/schema/aop @@ -88,17 +87,36 @@ <!-- Cache Config --> <cache:annotation-driven/> - <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" - p:cacheManager-ref="ehcache"/> <beans profile="ldap,saml"> <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache.xml" p:shared="true"/> + + <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" + p:cacheManager-ref="ehcache"/> </beans> <beans profile="testing"> <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:configLocation="classpath:ehcache-test.xml" p:shared="true"/> + + <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" + p:cacheManager-ref="ehcache"/> + + <!-- + <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" + p:configLocation="classpath:ehcache-test.xml" p:shared="true"/> + + <bean id="remoteCacheManager" class="org.apache.kylin.cache.cachemanager.MemcachedCacheManager" /> + <bean id="localCacheManager" class="org.apache.kylin.cache.cachemanager.InstrumentedEhCacheCacheManager" + p:cacheManager-ref="ehcache"/> + <bean id="cacheManager" class="org.apache.kylin.cache.cachemanager.RemoteLocalFailOverCacheManager" /> + + <bean id="memcachedCacheConfig" class="org.apache.kylin.cache.memcached.MemcachedCacheConfig"> + <property name="timeout" value="500" /> + <property name="hosts" value="${kylin.cache.memcached.hosts}" /> + </bean> + --> </beans> </beans> \ No newline at end of file