1 Reply Latest reply on Jun 29, 2015 5:35 AM by Sebastian Łaskawiec

    How to implement custom cache store (deployable) for Cassandra?

    Bingu Shim Newbie



      I'm currently trying to implement a CustomCacheStore for Cassandra version 2.1.6.

      This wiki page(https://github.com/infinispan/infinispan/wiki/Custom-Cache-stores-(deployable))

      and the archetype(infinispan/infinispan-cachestore-archetype · GitHub)  provide a good information for developing the cache store.


      So far I have succeeded the followings.


      1. Coding a Custom Cache Store for Cassandra version 2.1.6 with datastax driver

      2. Packaging it to a jar file that contains a service file in the proper location in the jar file.

      3. Deploying it to the Infinispan 7.2.0 Server Mode and it was successfully deployed.


      However when I define a cache with the cache store, and try to run Infinispan, it fails to configure cache store.

      The configuration is


                  <cache-container name="clustered" default-cache="default" statistics="true">

                      <transport executor="infinispan-transport" lock-timeout="60000"/>

                      <distributed-cache name="default" owners="1" segments="200" mode="ASYNC" remote-timeout="30000" start="EAGER">

                          <locking isolation="READ_COMMITTED" striping="false" acquire-timeout="30000" concurrency-level="1000"/>

                          <transaction mode="NONE"/>

                          <eviction strategy="LIRS" max-entries="1000"/>

                          <state-transfer enabled="false"/>

                          <store name="CASSANDRA_STORE" class="my.ispn.cassandrastore.CassandraStore" shared="false" preload="false" passivation="false" fetch-state="false" purge="false">

                              <write-behind flush-lock-timeout="1" modification-queue-size="2000" shutdown-timeout="25000" thread-pool-size="10"/>

                              <property name="host">localhost</property>

                              <property name="autoCreateKeyspace">true</property>



                      <distributed-cache name="namedCache" mode="SYNC" start="EAGER"/>



      and this is the error message. I have defined the property (host, autoCreateKeySpace, etc) to the Attribute class and also defined set method to the both Configuration and Builder class.

      What did I miss?


      WARN  [org.infinispan.configuration.parsing.XmlConfigHelper] (MSC service thread 1-14) ISPN000292: Unrecognized attribute host.  Please check your configuration.  Ignoring!!

      WARN  [org.infinispan.configuration.parsing.XmlConfigHelper] (MSC service thread 1-14) ISPN000292: Unrecognized attribute autoCreateKeyspace.  Please check your configuration.  Ignoring!!