You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2016/11/30 14:01:33 UTC
[14/16] james-project git commit: JAMES-1868 Remove Spring support
for Cassandra and ElasticSearch
JAMES-1868 Remove Spring support for Cassandra and ElasticSearch
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/b373bcd6
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/b373bcd6
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/b373bcd6
Branch: refs/heads/master
Commit: b373bcd6ecb5d6fca4be364fa4533dcaf655bcc9
Parents: 994c8d3
Author: Benoit Tellier <bt...@linagora.com>
Authored: Wed Nov 30 09:32:22 2016 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Wed Nov 30 17:36:37 2016 +0700
----------------------------------------------------------------------
.../META-INF/spring/mailbox-cassandra.xml | 94 --------------------
.../META-INF/spring/mailbox-elasticsearch.xml | 72 ---------------
.../main/resources/META-INF/spring/kafka.xml | 42 ---------
.../META-INF/spring/spring-mailbox.xml | 7 --
.../resources/cassandra-template.properties | 28 ------
.../resources/elasticsearch-template.properties | 24 -----
.../app/src/main/resources/indexer-template.xml | 2 +-
.../META-INF/org/apache/james/spring-server.xml | 5 --
8 files changed, 1 insertion(+), 273 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/mailbox/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml b/mailbox/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
deleted file mode 100644
index 5078a18..0000000
--- a/mailbox/cassandra/src/main/resources/META-INF/spring/mailbox-cassandra.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean id="cassandra-mailboxIdFactory" class="org.apache.james.mailbox.cassandra.CassandraId.Factory" />
- <!--
- Mailbox Cassandra
- -->
- <bean id="cassandra-mailboxmanager"
- class="org.apache.james.mailbox.cassandra.CassandraMailboxManager"
- init-method="init"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-sessionMapperFactory"/>
- <constructor-arg index="1" ref="authenticator"/>
- <constructor-arg index="2" ref="cassandra-locker"/>
- <constructor-arg index="3" ref="messageIdFactory" />
- <property name="messageSearchIndex" ref="elasticsearch-listener"/>
- <property name="quotaManager" ref="quotaManager"/>
- <property name="quotaRootResolver" ref="quotaRootResolver"/>
- <property name="quotaUpdater" ref="quotaUpdater"/>
- <property name="delegatingMailboxListener" ref="delegating-listener"/>
- </bean>
-
- <bean id ="cassandra-subscriptionManager"
- class="org.apache.james.mailbox.cassandra.CassandraSubscriptionManager"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-sessionMapperFactory"/>
- </bean>
-
- <bean id="cassandra-sessionMapperFactory"
- class="org.apache.james.mailbox.cassandra.CassandraMailboxSessionMapperFactory"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-uidProvider"/>
- <constructor-arg index="1" ref="cassandra-modSeqProvider"/>
- <constructor-arg index="2" ref="cassandra-session"/>
- <constructor-arg index="3" ref="cassandra-type-provider"/>
- </bean>
-
- <bean id="cassandra-uidProvider"
- class="org.apache.james.mailbox.cassandra.mail.CassandraUidProvider"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-session"/>
- </bean>
-
- <bean id="cassandra-modSeqProvider"
- class="org.apache.james.mailbox.cassandra.mail.CassandraModSeqProvider"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-session"/>
- </bean>
-
- <alias name="no-locker" alias="cassandra-locker"/>
-
- <bean name="cassandraMaxQuotaManager"
- class="org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaManager"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-session"/>
- </bean>
-
- <bean name="cassandraCurrentQuotaManager"
- class="org.apache.james.mailbox.cassandra.quota.CassandraCurrentQuotaManager"
- lazy-init="true">
- <constructor-arg index="0" ref="cassandra-session"/>
- </bean>
-
- <bean id="cassandra-mailbox-id-deserializer" class="org.apache.james.mailbox.cassandra.CassandraMailboxIdDeserializer"/>
-
- <bean id="cassandra-mailbox-path-register-mapper" class="org.apache.james.mailbox.cassandra.event.distributed.CassandraMailboxPathRegisterMapper" lazy-init="true">
- <constructor-arg index="0" ref="cassandra-session"/>
- <constructor-arg index="1" ref="cassandra-type-provider"/>
- <constructor-arg index="2" ref="${cassandra.mailbox.path.register.mapper.ttl}"/>
- </bean>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/mailbox/elasticsearch/src/main/resources/META-INF/spring/mailbox-elasticsearch.xml
----------------------------------------------------------------------
diff --git a/mailbox/elasticsearch/src/main/resources/META-INF/spring/mailbox-elasticsearch.xml b/mailbox/elasticsearch/src/main/resources/META-INF/spring/mailbox-elasticsearch.xml
deleted file mode 100644
index a2e9cb3..0000000
--- a/mailbox/elasticsearch/src/main/resources/META-INF/spring/mailbox-elasticsearch.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="ignoreUnresolvablePlaceholders" value="true"/>
- <property name ="location" value="classpath:elasticsearch.properties"/>
- </bean>
-
- <bean id="elasticsearch-listener" class="org.apache.james.mailbox.elasticsearch.events.ElasticSearchListeningMessageSearchIndex">
- <constructor-arg index="0" ref="messageMapperFactory"/>
- <constructor-arg index="1" ref="elasticsearch-indexer"/>
- <constructor-arg index="2" ref="elasticsearch-searcher"/>
- <constructor-arg index="3" ref="elasticsearch-json"/>
- </bean>
-
- <bean id="elasticsearch-indexer" class="org.apache.james.mailbox.elasticsearch.ElasticSearchIndexer">
- <constructor-arg index="0" ref="elasticsearch-clientprovider-2"/>
- </bean>
-
- <bean id="elasticsearch-json" class="org.apache.james.mailbox.elasticsearch.json.MessageToElasticSearchJson">
- <constructor-arg index="0" ref="text-extractor"/>
- </bean>
-
- <bean id="elasticsearch-searcher" class="org.apache.james.mailbox.elasticsearch.search.ElasticSearchSearcher">
- <constructor-arg index="0" ref="elasticsearch-clientprovider-2"/>
- <constructor-arg index="1" ref="query-converter"/>
- </bean>
-
- <bean id="elasticsearch-clientprovider-0" class="org.apache.james.mailbox.elasticsearch.ClientProviderImpl">
- <constructor-arg index="0" value="${elasticsearch.masterHost}"/>
- <constructor-arg index="1" value="${elasticsearch.port}"/>
- </bean>
-
- <bean id="elasticsearch-clientprovider-2" class="org.apache.james.mailbox.elasticsearch.NodeMappingFactory" factory-method="applyMapping">
- <constructor-arg index="0" ref="elasticsearch-clientprovider-1"/>
- </bean>
-
- <bean id="elasticsearch-clientprovider-1" class="org.apache.james.mailbox.elasticsearch.IndexCreationFactory" factory-method="createIndex">
- <constructor-arg index="0" ref="elasticsearch-clientprovider-0"/>
- </bean>
-
- <bean id="query-converter" class="org.apache.james.mailbox.elasticsearch.query.QueryConverter">
- <constructor-arg index="0" ref="criterion-converter"/>
- </bean>
-
- <bean id="criterion-converter" class="org.apache.james.mailbox.elasticsearch.query.CriterionConverter"/>
-
- <bean id="text-extractor" class="org.apache.james.mailbox.tika.extractor.TikaTextExtractor"/>
-
-</beans>
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/mailbox/kafka/src/main/resources/META-INF/spring/kafka.xml
----------------------------------------------------------------------
diff --git a/mailbox/kafka/src/main/resources/META-INF/spring/kafka.xml b/mailbox/kafka/src/main/resources/META-INF/spring/kafka.xml
deleted file mode 100644
index 870cebf..0000000
--- a/mailbox/kafka/src/main/resources/META-INF/spring/kafka.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
-
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
- <property name="ignoreUnresolvablePlaceholders" value="true"/>
- <property name ="location" value="classpath:events.properties"/>
- </bean>
-
- <bean id="kafka-publisher" class="org.apache.james.mailbox.kafka.KafkaPublisher" lazy-init="true">
- <constructor-arg index="0" ref="${kafka.ip}"/>
- <constructor-arg index="1" ref="${kafka.port}"/>
- </bean>
-
- <bean id="kafka-consumer" class="org.apache.james.mailbox.kafka.KafkaMessageConsumer" lazy-init="true">
- <constructor-arg index="0" ref="${zookeeper.connection.string}"/>
- <constructor-arg index="1" ref="${group.id}"/>
- <constructor-arg index="2" ref="${event.thread.count}"/>
- </bean>
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml
----------------------------------------------------------------------
diff --git a/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml b/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml
index f681a0d..db43d6a 100644
--- a/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml
+++ b/mailbox/spring/src/main/resources/META-INF/spring/spring-mailbox.xml
@@ -60,11 +60,4 @@
-->
<bean id="messageParser" class="org.apache.james.mailbox.store.mail.model.impl.MessageParser"/>
-
-
- <beans profile="cassandra">
- <import resource="classpath:META-INF/spring/mailbox-cassandra.xml"/>
- <import resource="classpath:META-INF/spring/mailbox-elasticsearch.xml"/>
- <!-- <import resource="classpath:META-INF/spring/kafka.xml"/> -->
- </beans>
</beans>
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/server/app/src/main/resources/cassandra-template.properties
----------------------------------------------------------------------
diff --git a/server/app/src/main/resources/cassandra-template.properties b/server/app/src/main/resources/cassandra-template.properties
deleted file mode 100644
index 0dd2c2a..0000000
--- a/server/app/src/main/resources/cassandra-template.properties
+++ /dev/null
@@ -1,28 +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.
-
-# This template file can be used as example for James Server configuration
-# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-
-# Configuration file for cassandra mailbox
-
-cassandra.ip=127.0.0.1
-cassandra.port=9042
-cassandra.keyspace=apache_james
-cassandra.replication.factor=1
-
-cassandra.mailbox.path.register.mapper.ttl=1800
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/server/app/src/main/resources/elasticsearch-template.properties
----------------------------------------------------------------------
diff --git a/server/app/src/main/resources/elasticsearch-template.properties b/server/app/src/main/resources/elasticsearch-template.properties
deleted file mode 100644
index cec4be8..0000000
--- a/server/app/src/main/resources/elasticsearch-template.properties
+++ /dev/null
@@ -1,24 +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.
-
-# This template file can be used as example for James Server configuration
-# DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
-
-# Configuration file for ElasticSearch
-
-elasticsearch.clusterName=elasticsearch
-elasticsearch.masterHost=127.0.0.1
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/server/app/src/main/resources/indexer-template.xml
----------------------------------------------------------------------
diff --git a/server/app/src/main/resources/indexer-template.xml b/server/app/src/main/resources/indexer-template.xml
index 8fd7248..24c52e7 100644
--- a/server/app/src/main/resources/indexer-template.xml
+++ b/server/app/src/main/resources/indexer-template.xml
@@ -27,7 +27,7 @@
<indexer>
<!-- supported providers are: -->
- <!-- lazyIndex, luceneIndex, elasticsearch -->
+ <!-- lazyIndex, luceneIndex -->
<!-- -->
<provider>luceneIndex</provider>
</indexer>
http://git-wip-us.apache.org/repos/asf/james-project/blob/b373bcd6/server/container/spring/src/main/resources/META-INF/org/apache/james/spring-server.xml
----------------------------------------------------------------------
diff --git a/server/container/spring/src/main/resources/META-INF/org/apache/james/spring-server.xml b/server/container/spring/src/main/resources/META-INF/org/apache/james/spring-server.xml
index 658f1e9..4a05a83 100644
--- a/server/container/spring/src/main/resources/META-INF/org/apache/james/spring-server.xml
+++ b/server/container/spring/src/main/resources/META-INF/org/apache/james/spring-server.xml
@@ -293,9 +293,4 @@
<bean id="metricFactory" class="org.apache.james.metrics.dropwizard.DropWizardMetricFactory"/>
-
- <beans profile="cassandra">
- <import resource="classpath:META-INF/cassandra-session.xml"/>
- </beans>
-
</beans>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org