incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Kutcharian <d...@venarc.com>
Subject Re: Documentation/Examples for DataStax java-driver
Date Wed, 13 Feb 2013 22:09:49 GMT
That's kinda what I was thinking to, just wanted to see if there's a built-in way.


On Feb 13, 2013, at 10:07 AM, Shahryar Sedghi <shsedghi@gmail.com> wrote:

> 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);
>     statement.setConsistencyLevel(ConsistencyLevel.QUORUM);
>      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 helps
> 
> 
> On Wed, Feb 13, 2013 at 12:23 PM, Drew Kutcharian <drew@venarc.com> wrote:
> @Shahryar/Gabriel
> 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?
> 
> @Edward
> 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.
> 
> 
> -- Drew
> 
> 
> 
> On Feb 13, 2013, at 8:06 AM, Edward Capriolo <edlinuxguru@gmail.com> wrote:
> 
> > Just an FYI. More appropriate for the client-dev list.
> >
> > On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
> > <gciuloaica@gmail.com> wrote:
> >> Code has good documentation and also the example module has enough sample
> >> code to help you started.
> >>
> >> --Gabi
> >>
> >> 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 <drew@venarc.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


Mime
View raw message