As mentioned previously the code comes with some detailed Javadoc. But you're right as well that Javadoc isn't enough. At DataStax we're currently working on a documentation for our drivers that will be as detailed as the one we provide for Apache Cassandra.
The API allows to build your own batch through building a query I do not use that, neither counter columns. I do not build a query, I create a CQL like:
String batchInsert = "BEGIN† BATCH " +
††† ††† "INSERT INTO xyz( a,††† b,††† c,† " +
††† ††† " VALUES ( ?, ?, ?)† " +
††† ††† "INSERT INTO def(a, b,†† ,c," +
††† ††† " VALUES ( ?, ?, ?) " +
††† ††† ††† ††† ††† †††
††† ††† ††† ††† ††† ††† ††† "APPLY BATCH";
†††† PreparedStatement prBatchInsert = session.prepare(batchInsert);
†††† BoundStatement query = prBatchInsert.bind(1,2,3, 1,2,3);
†††† session.execute(query);I got session through this:
cluster = Cluster.builder().addContactPoint(getInitParameter("cassandraCluster"))
††† ††† ††† ††† ††† .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE ).build();
†session = cluster.connect(getInitParameter("keyspace"));I have queries that i have begin unlogged batch instead of begin batch
Hopefully it helpsOn Wed, Feb 13, 2013 at 12:23 PM, Drew Kutcharian <firstname.lastname@example.org> wrote:
I know the source code is nicely documented, but I couldn't find much info on:
1. Creating/submitting atomic/non-atomic batches.
2. Handling Counter columns
Do you have any examples for that?
I was under impression that client-dev mailing list was to be used by the developers/committers of the client libs and each client has their own mailing list such as hector, but I'm not sure there exist a mailing list for DataStax's java-driver.
On Feb 13, 2013, at 8:06 AM, Edward Capriolo <email@example.com> wrote:
> Just an FYI. More appropriate for the client-dev list.
> On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
> <firstname.lastname@example.org> wrote:
>> Code has good documentation and also the example module has enough sample
>> code to help you started.
>> On 2/13/13 5:31 PM, Shahryar Sedghi wrote:
>> Source code has enough documentation in it, apparently this is how they do
>> it with new stuff. Start with Custer class, it tells you how to write. If
>> you still had problem let me know, I can give you sample code.
>> On Tue, Feb 12, 2013 at 9:19 PM, Drew Kutcharian <email@example.com> wrote:
>>> Are there any documentation/examples available for DataStax java-driver
>>> besides what's in the GitHub repo?
>>> -- Drew
>> "Life is what happens while you are making other plans." ~ John Lennon
"Life is what happens while you are making other plans." ~ John Lennon