I just want to know whether there is any possible method to implement locking of a data in cassandra?I tried with multithreading using hector but this didn't work out well. Can anyone suggest a method?
Asked
Active
Viewed 32 times
0
-
Can you please explain what do you mean by "locking" – Roman Tumaykin Mar 02 '15 at 21:55
-
Actually what I meant was if a data in cassandra was accessed concurrently by 2 or more nodes , then there is no locking mechanism such that one at a time gets the data. Now the problem is solved by using astyanax API. – Arvind R. Mar 03 '15 at 04:49
-
It provides a distributed locking mechanism. – Arvind R. Mar 03 '15 at 04:50
1 Answers
0
Cassandra does not support any type of locking. Out of 4 traditional database properties (ACID - Atomicity, Consistency, Isolation and Durability), it only fully supports D. The way it supports the other 3 is arguable, because they only support each one of them partially. You can read more here. IMHO the only way to accomplish your goal is to use some synchronization layer which will intercept all calls to Cassandra and performa all necessary locking inside of itself, before anything is sent to Cassandra. In this case, you're using Astyanax as such layer.

Roman Tumaykin
- 1,921
- 11
- 11