3 Replies Latest reply on Mar 8, 2013 5:14 AM by marcb

    Errors in Cassandra when using the CassandraCacheStore

    marcb Newbie

      When using preload = true or when performing a cache.clear() (via hotrod) the following exception appears in the cassandra log:

      java.lang.NumberFormatException: For input string: ""
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
              at java.lang.Long.parseLong(Long.java:453)
              at java.lang.Long.valueOf(Long.java:540)
              at org.apache.cassandra.dht.Murmur3Partitioner$1.fromString(Murmur3Partitioner.java:186)
              at org.apache.cassandra.thrift.ThriftValidation.validateKeyRange(ThriftValidation.java:486)
              at org.apache.cassandra.thrift.CassandraServer.get_range_slices(CassandraServer.java:919)
              at org.apache.cassandra.thrift.Cassandra$Processor$get_range_slices.getResult(Cassandra.java:3454)
              at org.apache.cassandra.thrift.Cassandra$Processor$get_range_slices.getResult(Cassandra.java:3442)
              at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
              at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
              at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
      


      This results in preload not working and clearing a cache not working.

       

      The infinispan log is not very exciting:

      2013-03-07 12:04:43,610 - DEBUG - AsyncStoreCoordinator-test - [org.infinispan.loaders.decorators.AsyncStore$AsyncStoreCoordinator:run@692] - Failed to process async modifications
      org.infinispan.loaders.CacheLoaderException: org.apache.thrift.transport.TTransportException
              at org.infinispan.loaders.cassandra.CassandraCacheStore.clear(CassandraCacheStore.java:368)
              at org.infinispan.loaders.decorators.AsyncStore$AsyncStoreCoordinator.run(AsyncStore.java:643)
              at java.lang.Thread.run(Thread.java:722)
      Caused by: org.apache.thrift.transport.TTransportException
              at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
              at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
              at org.apache.thrift.transport.TFastFramedTransport.readFrame(TFastFramedTransport.java:140)
              at org.apache.thrift.transport.TFastFramedTransport.read(TFastFramedTransport.java:134)
              at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
              at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
              at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
              at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
              at org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandra.java:752)
              at org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.java:734)
              at org.infinispan.loaders.cassandra.CassandraCacheStore.clear(CassandraCacheStore.java:353)
              ... 2 more
      


      Loader config:

      <loaders shared="true" preload="false">
          <loader class="org.infinispan.loaders.cassandra.CassandraCacheStore" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
              <properties>
                  <property name="autoCreateKeyspace" value="true"/>
                  <property name="host" value="localhost" />
                  <property name="keySpace" value="testKeySpace" />
                  <property name="entryColumnFamily" value="testEntry" />
                  <property name="expirationColumnFamily" value="testExpiration" />
                  <property name="sharedKeyspace" value="false" />
                  <property name="readConsistencyLevel" value="QUORUM" />
                  <property name="writeConsistencyLevel" value="QUORUM" />
                  <property name="configurationPropertiesFile" value="cassandrapool.properties" />
                  <property name="keyMapper" value="org.infinispan.loaders.keymappers.DefaultTwoWayKey2StringMapper" />
              </properties>
      
              <async enabled="true" threadPoolSize="1" />
          </loader>
      </loaders>
      

       

      Using String as key and byte[] as value in the cache if it matters.
      Have tried both the Murmur3Partitioner and the RandomPartitioner, didn't appear to make any difference.

      Using Infinispan 5.2.1.Final and Cassandra 1.2.0


      Any ideas?

       

      EDIT: keySet also doesn't work, guess anything that depends on getting all keys from Cassandra is non-working.