Cassandra Datastores

DataNucleus supports a limited for of persisting/retrieving objects to/from Cassandra datastores (using the datanucleus-cassandra plugin, which utilises the DataStax Java driver). Simply specify your "connectionURL" as follows

datanucleus.ConnectionURL=cassandra:[{host1}[:{port}] [,{host2} [,{host3}]]]

where it will create a Cassandra cluster with contact points of host1 (host2, host3 etc), and if the port is specified on the first host then will use that as the port (no port specified on alternate hosts).

For example, to connect to a local server


NOTE THAT THIS IS A WORK-IN-PROGRESS NEW PLUGIN THAT NEEDS YOUR HELP TO FULLY DEVELOP. It is intended to have this plugin feature complete by DataNucleus v4.0, but is available in GitHub for testing/improvement. The jars required to use DataNucleus Cassandra persistence are datanucleus-core, datanucleus-api-jdo/datanucleus-api-jpa, datanucleus-cassandra and cassandra-driver-core

Things to bear in mind with Cassandra usage :-

  • Cassandra doesn't use transactions, so any JDO/JPA transaction operation is a no-op (i.e will be ignored).
  • This uses Cassandra 2.x (and CQL v3.x), not Thrift (like the previous unofficial attempts at a datanucleus-cassandra plugin used)