You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Drew Kutcharian <dr...@venarc.com> on 2013/02/13 03:19:53 UTC

Documentation/Examples for DataStax java-driver

Are there any documentation/examples available for DataStax java-driver besides what's in the GitHub repo?

-- Drew

Re: Documentation/Examples for DataStax java-driver

Posted by Drew Kutcharian <dr...@venarc.com>.
@Edward. I completely agree. I was just explaining my original rationale in posting to this mailing list. 

Maybe it's time to start a dedicated DataStax java-driver mailing list.


On Feb 13, 2013, at 12:53 PM, Edward Capriolo <ed...@gmail.com> wrote:

> @Drew
> 
> This list is for cassandra users. Since the DataStax java-driver is
> not actually part of Cassandra. If every user comes here to talk about
> their driver/orm/problems they are having with code that is not part
> of cassandra this list will get noisy.
> 
> IMHO client-dev is the right place for these type of topics.
> Occasionally a cross post makes sense.
> 
> Edward
> 
> On Wed, Feb 13, 2013 at 12:23 PM, Drew Kutcharian <dr...@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 <ed...@gmail.com> wrote:
>> 
>>> Just an FYI. More appropriate for the client-dev list.
>>> 
>>> On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
>>> <gc...@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 <dr...@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
>>>> 
>>>> 
>> 


Re: Documentation/Examples for DataStax java-driver

Posted by Drew Kutcharian <dr...@venarc.com>.
@Edward. I completely agree. I was just explaining my original rationale in posting to this mailing list. 

Maybe it's time to start a dedicated DataStax java-driver mailing list.


On Feb 13, 2013, at 12:53 PM, Edward Capriolo <ed...@gmail.com> wrote:

> @Drew
> 
> This list is for cassandra users. Since the DataStax java-driver is
> not actually part of Cassandra. If every user comes here to talk about
> their driver/orm/problems they are having with code that is not part
> of cassandra this list will get noisy.
> 
> IMHO client-dev is the right place for these type of topics.
> Occasionally a cross post makes sense.
> 
> Edward
> 
> On Wed, Feb 13, 2013 at 12:23 PM, Drew Kutcharian <dr...@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 <ed...@gmail.com> wrote:
>> 
>>> Just an FYI. More appropriate for the client-dev list.
>>> 
>>> On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
>>> <gc...@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 <dr...@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
>>>> 
>>>> 
>> 


Re: Documentation/Examples for DataStax java-driver

Posted by Edward Capriolo <ed...@gmail.com>.
@Drew

This list is for cassandra users. Since the DataStax java-driver is
not actually part of Cassandra. If every user comes here to talk about
their driver/orm/problems they are having with code that is not part
of cassandra this list will get noisy.

IMHO client-dev is the right place for these type of topics.
Occasionally a cross post makes sense.

Edward

On Wed, Feb 13, 2013 at 12:23 PM, Drew Kutcharian <dr...@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 <ed...@gmail.com> wrote:
>
>> Just an FYI. More appropriate for the client-dev list.
>>
>> On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
>> <gc...@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 <dr...@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
>>>
>>>
>

Re: Documentation/Examples for DataStax java-driver

Posted by Michaël Figuière <mi...@gmail.com>.
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.

Meanwhile we'll also add more code samples to make it easier for newcomers.



Michaël

On Wed, Feb 13, 2013 at 10:07 AM, Shahryar Sedghi <sh...@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 <dr...@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 <ed...@gmail.com>
>> wrote:
>>
>> > Just an FYI. More appropriate for the client-dev list.
>> >
>> > On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
>> > <gc...@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 <dr...@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
>

Re: Documentation/Examples for DataStax java-driver

Posted by Drew Kutcharian <dr...@venarc.com>.
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 <sh...@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 <dr...@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 <ed...@gmail.com> wrote:
> 
> > Just an FYI. More appropriate for the client-dev list.
> >
> > On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
> > <gc...@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 <dr...@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


Re: Documentation/Examples for DataStax java-driver

Posted by Shahryar Sedghi <sh...@gmail.com>.
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 <dr...@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 <ed...@gmail.com>
> wrote:
>
> > Just an FYI. More appropriate for the client-dev list.
> >
> > On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
> > <gc...@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 <dr...@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

Re: Documentation/Examples for DataStax java-driver

Posted by Drew Kutcharian <dr...@venarc.com>.
@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 <ed...@gmail.com> wrote:

> Just an FYI. More appropriate for the client-dev list.
> 
> On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
> <gc...@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 <dr...@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
>> 
>> 


Re: Documentation/Examples for DataStax java-driver

Posted by Edward Capriolo <ed...@gmail.com>.
Just an FYI. More appropriate for the client-dev list.

On Wed, Feb 13, 2013 at 10:37 AM, Gabriel Ciuloaica
<gc...@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 <dr...@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
>
>

Re: Documentation/Examples for DataStax java-driver

Posted by Gabriel Ciuloaica <gc...@gmail.com>.
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 
> <ma...@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


Re: Documentation/Examples for DataStax java-driver

Posted by Shahryar Sedghi <sh...@gmail.com>.
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 <dr...@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