Problem with Cassandra Cache Store
fwachs Feb 22, 2012 1:04 PMHi all
I've been trying effortlessly to try and setup a Cassandra Cache Store.
This is my XML configuration which I use to start Infinispan:
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, Home of Professional Open Source
~ Copyright 2009 Red Hat Inc. and/or its affiliates and other
~ contributors as indicated by the @author tags. All rights reserved.
~ See the copyright.txt in the distribution for a full listing of
~ individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.1 http://www.infinispan.org/schemas/infinispan-config-5.1.xsd"
xmlns="urn:infinispan:config:5.1">
<global>
<transport clusterName="demoCluster" distributedSyncTimeout="50000" />
<globalJmxStatistics enabled="true"/>
</global>
<default>
<jmxStatistics enabled="true"/>
<clustering mode="distribution">
<l1 enabled="true" lifespan="60000"/>
<hash numOwners="2" rehashRpcTimeout="120000"/>
<sync/>
</clustering>
</default>
<namedCache name="cassandraCache">
<loaders passivation="false" shared="true" preload="false">
<loader class="org.infinispan.loaders.cassandra.CassandraCacheStore" fetchPersistentState="true" ignoreModifications="false"
purgeOnStartup="false">
<properties>
<property name="host" value="localhost" />
<property name="keySpace" value="Infinispan" />
<property name="entryColumnFamily" value="InfinispanEntries" />
<property name="expirationColumnFamily" value="InfinispanExpiration" />
<property name="sharedKeyspace" value="false" />
<property name="readConsistencyLevel" value="ONE" />
<property name="writeConsistencyLevel" value="ONE" />
<property name="configurationPropertiesFile" value="/Users/admin/Desktop/cassandrapool.properties" />
<property name="keyMapper" value="org.infinispan.loaders.keymappers.DefaultTwoWayKey2StringMapper" />
<property name="autoCreateKeyspace" value="true" />
</properties>
</loader>
</loaders>
</namedCache>
</infinispan>
This is my cassandrapool.properties:
socketTimeout = 5000
initialSize = 10
maxActive = 100
maxIdle = 20
minIdle = 10
maxWait = 30000
testOnBorrow = false
testOnReturn = false
testWhileIdle = false
timeBetweenEvictionRunsMillis = 5000
removeAbandoned = false
removeAbandonedTimeout = 60
logAbandoned = false
I'm using Cassandra 1.0.7 .
I've checked the log files, no errors there. But I checked Infinispan's cassandras module source code and It's not logging what that class does or should be doing.
It's not even creating the KeySpace on my cassandra db...
So basically i'm totally lost since the log files are not clear but I do know that nothing's being done in cassandra because the keyspace is not being created.
This is how I run the server:
./bin/startServer.sh -r memcached -c etc/config-samples/custom-cache-config.xml -p 11211
And I have also moved the jar files from the modules folder to the lib folder in order to infinispan to start.
Anybody has any idea what could possible be going on?
Any kind of help would be greatly appreciated!
Regards,
Federico