Skip to content

Astyanax over Java Driver

opuneet edited this page Jan 8, 2014 · 15 revisions

Highly recommended readings

Note - this is a BETA release only

Java-Driver does some of the heavy lifting like load balancing and connection pooling and also provides some neat features such as cursor support and async requests. But note that thrift and CQL3 have several differences.

Building and supporting a unified API that straddles both drivers (thrift and Java Driver) is challenging and sometimes not feasible. Hence please review your use case to see if it is supported by this driver.

We have listed the caveats below along with several examples with the different types of schemas that are supported by the implementation.

How to select the right lib release version.

There are 2 main code branches and release versions for Astyanax.

Start with setting up your keyspace context

Cache the column family definition with your ColumnFamily object

Reads / Queries - how to use PreparedStatements for better performance

Writes / Mutations - how to use PreparedStatements for better performance

Examples

Simple ColumnFamily definition

ColumnFamily with composite columns

Regular flat table style ColumnFamily

Clone this wiki locally