Re: Questions about timestamp set at writetime

2014-06-17 Thread tommaso barbugli
when inserting with a batch every row have the same timestamp; I also think
(not 100%) that is not possible to define different timestamps within a
batch.

Tommaso


2014-06-17 14:10 GMT+02:00 DuyHai Doan doanduy...@gmail.com:

 Hello all

  I know that at write time a timestamp is automatically generated by the
 server and assigned to each column.

  My questions are:

 1) Who is responsible for this micro-second timestamp ? The coordinator
 which receives the insert request or each replica which actually do persist
 the data ?

 2) In a case of a batch insert (CQL3 batch, not batch mutation Thrift
 API), if no user defined timestamp is set, neither on the batch statement
 nor on each individual statement, will C* generate a SAME timestamp for
 each individual statement in the batch or will there distinct timestamps ?

 Regards


  Duy Hai DOAN



Re: Questions about timestamp set at writetime

2014-06-17 Thread DuyHai Doan
that is not possible to define different timestamps within a batch -- It
is possible :
http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/batch_r.html


On Tue, Jun 17, 2014 at 2:17 PM, tommaso barbugli tbarbu...@gmail.com
wrote:

 when inserting with a batch every row have the same timestamp; I also
 think (not 100%) that is not possible to define different timestamps within
 a batch.

 Tommaso


 2014-06-17 14:10 GMT+02:00 DuyHai Doan doanduy...@gmail.com:

 Hello all

  I know that at write time a timestamp is automatically generated by the
 server and assigned to each column.

  My questions are:

 1) Who is responsible for this micro-second timestamp ? The coordinator
 which receives the insert request or each replica which actually do persist
 the data ?

 2) In a case of a batch insert (CQL3 batch, not batch mutation Thrift
 API), if no user defined timestamp is set, neither on the batch statement
 nor on each individual statement, will C* generate a SAME timestamp for
 each individual statement in the batch or will there distinct timestamps ?

 Regards


  Duy Hai DOAN





Re: Questions about timestamp set at writetime

2014-06-17 Thread tommaso barbugli
thats going to be the timestamp for the data affected.
what I meant is that you cant have different timestamps (insert x timestamp
y; insert x' timestamp y')


2014-06-17 14:27 GMT+02:00 DuyHai Doan doanduy...@gmail.com:

 that is not possible to define different timestamps within a batch --
 It is possible :
 http://www.datastax.com/documentation/cql/3.1/cql/cql_reference/batch_r.html


 On Tue, Jun 17, 2014 at 2:17 PM, tommaso barbugli tbarbu...@gmail.com
 wrote:

 when inserting with a batch every row have the same timestamp; I also
 think (not 100%) that is not possible to define different timestamps within
 a batch.

 Tommaso


 2014-06-17 14:10 GMT+02:00 DuyHai Doan doanduy...@gmail.com:

 Hello all

  I know that at write time a timestamp is automatically generated by the
 server and assigned to each column.

  My questions are:

 1) Who is responsible for this micro-second timestamp ? The coordinator
 which receives the insert request or each replica which actually do persist
 the data ?

 2) In a case of a batch insert (CQL3 batch, not batch mutation Thrift
 API), if no user defined timestamp is set, neither on the batch statement
 nor on each individual statement, will C* generate a SAME timestamp for
 each individual statement in the batch or will there distinct timestamps ?

 Regards


  Duy Hai DOAN






Re: Questions about timestamp set at writetime

2014-06-17 Thread Sylvain Lebresne

 1) Who is responsible for this micro-second timestamp ? The coordinator
 which receives the insert request or each replica which actually do persist
 the data ?


The coordinator.



 2) In a case of a batch insert (CQL3 batch, not batch mutation Thrift
 API), if no user defined timestamp is set, neither on the batch statement
 nor on each individual statement, will C* generate a SAME timestamp for
 each individual statement in the batch or will there distinct timestamps ?


All the sub-statements will have the same timestamp.

--
Sylvain


Re: Questions about timestamp set at writetime

2014-06-17 Thread DuyHai Doan
Thank you Sylvain for the very clear explanations




On Tue, Jun 17, 2014 at 2:44 PM, Sylvain Lebresne sylv...@datastax.com
wrote:



 1) Who is responsible for this micro-second timestamp ? The coordinator
 which receives the insert request or each replica which actually do persist
 the data ?


 The coordinator.



 2) In a case of a batch insert (CQL3 batch, not batch mutation Thrift
 API), if no user defined timestamp is set, neither on the batch statement
 nor on each individual statement, will C* generate a SAME timestamp for
 each individual statement in the batch or will there distinct timestamps ?


 All the sub-statements will have the same timestamp.

 --
 Sylvain