Question

I am looking for a java API which can handle collections in Cassandra. Which has methods to read/update/insert/delete collections like list/set/map in a column value. I am using Hector client now, I did not find any methods which could perform the above requirement. The API should be able to handle mixed column types (like one column value can be utf8 and other can be collection). Any example or tutorial will be appreciated as well.

Was it helpful?

Solution

C* collections are part of the CQL spec v.3. The only Java driver, that I'm aware of, supporting this spec completely is the open source DataStax Java driver. The driver offers 2 ways of working with CQL statements: one based on Statements/PreparedStatements/etc. and one using a fluent API.

If you are using Cassandra 1.2.x then look for the version 1.x of the driver. In case you are on Cassandra 2.0.x look for the version 2.0 of the driver (this is currently RC2, soon to go final).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top