BATCH OPERATION issue

2017-09-13 Thread Deepak Panda
Hi All,

Am in the process of learning batch operations. Here is what I tried.

Executed a CQL query against the student table(student_id is the primary key).


select student_id,position,WRITETIME(class_id),WRITETIME(position)
FROM student WHERE student_id='s123';

student_id position writetime(class_id) writetime(position)
s123  1 1505293712083000 1505293712083000


Then tried to update the "position" column using the following BATCH operation.

BEGIN BATCH USING TIMESTAMP 1505291962469002
 UPDATE
student
SET
POSITION = 3
WHERE
student_id = 's123';
APPLY BATCH;

In this case the update does not take effect.

But when I remove "USING TIMESTAMP" clause it works as expected.

What could be the reason? I am using Casandra 3.11.

Regards,
AL

-
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org



Re: New Column addition and Locking

2017-09-08 Thread Deepak Panda
Many Thanks Jeff for the answer and the relevant details. Can you
please share the bug#?

Are there any opensource tools available for Cassandra which manage
schema changes for Cassandra?

On Fri, Sep 8, 2017 at 7:57 PM, Jeff Jirsa <jji...@gmail.com> wrote:
> There is no lock and it doesn't block existing reads or writes
>
> You're already on 3.11, but as a reminder for others there's a bug in 3.0 
> versions between (3.0.0 and 3.0.14) and (3.0 and 3.11.0) that can cause 
> corruption when you add columns. It's fixed in both 3.11.0 and 3.0.14, so if 
> you need to alter your table and you're on a 3.something version that isn't 
> one of those, upgrade first.
>
> --
> Jeff Jirsa
>
>
>> On Sep 8, 2017, at 7:13 AM, Deepak Panda <deepak.pa...@gmail.com> wrote:
>>
>> Hi,
>>
>> For Cassandra 3.11, when we add a new column is added to an existing
>> table having huge number of rows and huge data manipulation going on
>> will there be any issues?
>>
>> Will the operations blocked till the column is added?
>>
>> Is the table locked during column addition? If yes, what type of lock?
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
>> For additional commands, e-mail: user-h...@cassandra.apache.org
>>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
> For additional commands, e-mail: user-h...@cassandra.apache.org
>

-
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org



New Column addition and Locking

2017-09-08 Thread Deepak Panda
Hi,

For Cassandra 3.11, when we add a new column is added to an existing
table having huge number of rows and huge data manipulation going on
will there be any issues?

Will the operations blocked till the column is added?

Is the table locked during column addition? If yes, what type of lock?

-
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org