Re: Hector counter question

2012-03-19 Thread Tamar Fraenkel
Thanks. But the increment is thread safe right? if I have two threads trying to increment a counter, then they won't step on each other toe? *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972

Cassandra as Database for Role Based Access Control System

2012-03-19 Thread Maciej Miklas
Hi *, I would like to know your opinion about using Cassandra to implement a RBAC-like authentication & authorization model. We have simplified the central relationship of the general model ( http://en.wikipedia.org/wiki/Role-based_access_control) to: user ---n:m--- role ---n:m--- resource user(

Mutator or Template?

2012-03-19 Thread Tamar Fraenkel
Hi! I am using Cassandra with Hector. Usually I use ColumnFamilyTemplate and ColumnFamilyUpdater to update column families, but sometimes I use Mutator. 1. Is there a preference of using one vs. the other? 2. Are there any actions that can be done with only one of them? Thanks, *Tamar Fraenkel

Re: repair broke TTL based expiration

2012-03-19 Thread ruslan usifov
cleanup in you case doesn't have any seens. You write that repair work for you, so you can stop cassandra daemon, delete all data from folder that contain problem data, start cassandra daemon, and run nodetool repair, but in this case ypu must have replication factor for keyspace > 3 and have consi

Storing Counters in Hive

2012-03-19 Thread Sunit Randhawa
I am trying to store Counters CF from cassandra to Hive. Below is the CREATE TABLE syntax in Hive: DROP TABLE IF EXISTS Counters; create external table Counters(row_key string, column_name string, value string) STORED BY 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler' WITH SERDEPROPERTI

Re: repair broke TTL based expiration

2012-03-19 Thread igor
You can try to play with comaction thresholds - looks like your data wait too long before sizetiered compaction start to merge old large sstables. I have the same scenario as you (no deletes, all data with TTL) and I use script which call userdefinedcompaction on these old sstables. -Origin

Re: repair broke TTL based expiration

2012-03-19 Thread Radim Kolar
Dne 19.3.2012 23:33, ruslan usifov napsal(a): Do you make major compaction?? no, i do cleanups only. Major compactions kills my node with OOM.

Re: repair broke TTL based expiration

2012-03-19 Thread ruslan usifov
Do you make major compaction?? 2012/3/19 Radim Kolar : > I suspect that running cluster wide repair interferes with TTL based > expiration. I am running repair every 7 days and using TTL expiration time 7 > days too. Data are never deleted. > Stored data in cassandra are always growing (watching t

Re: cassandra-cli and "uncreachable" status confusion

2012-03-19 Thread Shoaib Mir
On Tue, Mar 20, 2012 at 4:18 AM, aaron morton wrote: > There is a server side check to ensure that all available nodes share the > same schema version. > > Is that checked using "describe cluster" ?? cheers, Shoaib

Re: repair broke TTL based expiration

2012-03-19 Thread Radim Kolar
Dne 19.3.2012 21:46, Caleb Rackliffe napsal(a): I've been wondering about this too, but every column has both a timestamp /and/ a TTL. Unless the timestamp is not preserved, there should be no need to adjust the TTL, assuming the expiration time is determined from these two variables. timestam

Re: repair broke TTL based expiration

2012-03-19 Thread Radim Kolar
Dne 19.3.2012 20:28, i...@4friends.od.ua napsal(a): Hello Datasize should decrease during minor compactions. Check logs for compactions results. they do but not as much as i expect. Look at sizes and file dates: -rw-r--r-- 1 root wheel 5.4G Feb 23 17:03 resultcache-hc-27045-Data.db -rw

replication in a 3 data center setup

2012-03-19 Thread Alexandru Sicoe
Hi everyone, If you have 3 data centers (DC1,DC2 and DC3) with 3 nodes each and you have a keyspace where the strategy options are such that each DC gets 2 replicas. If you only write to the nodes in DC1 what is the path the replicas take? Assuming you've correctly interleaved the tokens of all th

Re: repair broke TTL based expiration

2012-03-19 Thread Caleb Rackliffe
I've been wondering about this too, but every column has both a timestamp and a TTL. Unless the timestamp is not preserved, there should be no need to adjust the TTL, assuming the expiration time is determined from these two variables. Does that make sense? My question is how often Cassandra c

Re: repair broke TTL based expiration

2012-03-19 Thread igor
Hello Datasize should decrease during minor compactions. Check logs for compactions results.   -Original Message- From: Radim Kolar To: user@cassandra.apache.org Sent: Mon, 19 Mar 2012 12:16 Subject: repair broke TTL based expiration I suspect that running cluster wide repair interf

RE: Hector counter question

2012-03-19 Thread Jeremiah Jordan
No, Cassandra doesn't support atomic counters. IIRC it is on the list of things for 1.2. -Jeremiah From: Tamar Fraenkel [ta...@tok-media.com] Sent: Monday, March 19, 2012 1:26 PM To: cassandra-u...@incubator.apache.org Subject: Hector counter question Hi! Is t

Re: Token Ring Gaps in a 2 DC Setup

2012-03-19 Thread Caleb Rackliffe
Hey Aaron, I've run cleanup jobs across all 15 nodes, and after that, I still have about a 24 million to 15 million key ratio between the data centers. The first DC is a few months older than the second, and it also began its life before 1.0.7 was out, whereas the second started at 1.0.7. I w

Hector counter question

2012-03-19 Thread Tamar Fraenkel
Hi! Is there a way to read and increment counter column atomically, something like incrementAndGet (Hector)? Thanks, *Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 <>

Re: Token Ring Gaps in a 2 DC Setup

2012-03-19 Thread aaron morton
> I've also run repair on a few nodes in both data centers, but the sizes are > still vastly different. If repair is completing on all the nodes then the data is fully distributed. If you want to dig around… Take a look at the data files on disk. Do the nodes in DC 1 have some larger, older,

Re: cassandra-cli and "uncreachable" status confusion

2012-03-19 Thread aaron morton
There is a server side check to ensure that all available nodes share the same schema version. The migration will proceed though if any of the nodes are unavailable. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 17/03/2012, at 11:07 AM,

Mutator or Template?

2012-03-19 Thread Tamar Fraenkel
Hi! I am using Cassandra with Hector. Usually I use ColumnFamilyTemplate and ColumnFamilyUpdater to update column families, but sometimes I use Mutator. 1. Is there a preference of using one vs. the other? 2. Are there any actions that can be done with only one of them? Thanks, *Tamar Fraenkel

Re: Max # of CFs

2012-03-19 Thread Alain RODRIGUEZ
This subject was already discussed, this may help you : http://markmail.org/message/6dybhww56bxvufzf#query:+page:1+mid:6dybhww56bxvufzf+state:results If you still got questions after reading this thread or some others about the same topic, do not hesitate asking again, Alain 2012/3/19 A J > H

RE: Get few rows by composite key.

2012-03-19 Thread Stephen Pope
Those are going to have to be separate queries, since the first is a slice, and the second is a fetch. Cheers, Steve From: Michael Cherkasov [mailto:michael.cherka...@gmail.com] Sent: Monday, March 19, 2012 9:41 AM To: user@cassandra.apache.org Subject: Re: Get few rows by composite key. Also o

RE: Get few rows by composite key.

2012-03-19 Thread Stephen Pope
I'm not sure about Hector code (somebody else can chime in here), but to find the keys you're after you can slice to get the keys from AA:BB to BB:AA. Cheers, Steve From: Michael Cherkasov [mailto:michael.cherka...@gmail.com] Sent: Monday, March 19, 2012 9:30 AM To: user@cassandra.apache.org Sub

Re: Get few rows by composite key.

2012-03-19 Thread Michael Cherkasov
Also one more question: Can someone show query that will fetch all rows match to this condition: ( AA:(part 2>= BB) ) or ( key == (BB:CC) ) 2012/3/19 Michael Cherkasov > Hello, > Assume that we have table like this one: > > Key:Columns names: > AA:AA 1:A 1:B 1:C 2:A 2:C > AA:BB

Max # of CFs

2012-03-19 Thread A J
How many Column Families are one too many for Cassandra ? I created a db with 5000 CFs (I can go into the reasons later) but the latency seems to be very erratic now. Not sure if it is because of the number of CFs. Thanks.

Get few rows by composite key.

2012-03-19 Thread Michael Cherkasov
Hello, Assume that we have table like this one: Key:Columns names: AA:AA 1:A 1:B 1:C 2:A 2:C AA:BB 1:C 2:A 2:C AA:CC 2:A 2:C AA:DD 1:A 1:B 1:C BB:AA 1:A 1:B 2:C BB:BB 1:A 1:B 1:C 2:C BB:CC 1:A 2:A 2:C BB:DD 1:A 1:C 2:A 2:C Is there any way to take rows wi

Another consistency level problem

2012-03-19 Thread Everton Lima
Hello people, I was having the following problem: I was running a single node of Cassandra, using cassandra's consistency level ALL. My program (in java) is a B-Tree like and a node store how many childrens it has. In every update my app do, like a insert of a new children, it do a commit, saving

repair broke TTL based expiration

2012-03-19 Thread Radim Kolar
I suspect that running cluster wide repair interferes with TTL based expiration. I am running repair every 7 days and using TTL expiration time 7 days too. Data are never deleted. Stored data in cassandra are always growing (watching them for 3 months) but they should not. If i run manual cleanu

Re: consistency level question

2012-03-19 Thread aaron morton
Some information on node failures, consistency levels and availability http://thelastpickle.com/2011/06/13/Down-For-Me/ Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 19/03/2012, at 1:08 PM, Watanabe Maki wrote: > Yes, read and write won

Re: Secondary Index Validation Type Parse Error

2012-03-19 Thread aaron morton
> java.lang.RuntimeException: org.apache.cassandra.db.marshal.MarshalException: > cannot parse 'subject' as hex bytes This has to do with the create column family statement... > and comparator = 'BytesType' Tells Cassandra that all column names in this CF should be interpreted as raw bytes. Th

Re: Single Node Cassandra Installation

2012-03-19 Thread aaron morton
> Even more: if you enable read repair the chances of having bad writes > decreases for any further reads. This will make your cluster become faster > consistent again after some failure. Under 1.0 the default RR probability was reduced to 10%. Because Hinted Handoff was changed to also store h

Re: Question regarding secondary indices

2012-03-19 Thread aaron morton
> This way one can take adv of the speedup that you get from reading accross > multiple drives. > Or alternatively is it possible to run multiple instances of sstableloader on > the same machine concurrently? Without checking the code, i would assume you can run multiple instances. Alternativel

Re: 0.8.1 Vs 1.0.7

2012-03-19 Thread Sylvain Lebresne
On Mon, Mar 19, 2012 at 9:27 AM, Chris Goffinet wrote: > When creating a new CF, defaults are now in fact compression enabled. For the record, that will be true starting in 1.1 but isn't be the default before that. -- Sylvain > On Sat, Mar 17, 2012 at 5:50 AM, R. Verlangen wrote: >> >> Check

Re: design that mimics twitter tweet search

2012-03-19 Thread Sasha Dolgy
most excellent ... thanks Chris! On Mon, Mar 19, 2012 at 9:23 AM, Chris Goffinet wrote: > We do not use Cassandra for search. We made modifications to Lucene. > > Here is a blog post on our engineering section that talks about what we > did: > > > http://engineering.twitter.com/2011/04/twitter-se

Re: 0.8.1 Vs 1.0.7

2012-03-19 Thread Chris Goffinet
When creating a new CF, defaults are now in fact compression enabled. On Sat, Mar 17, 2012 at 5:50 AM, R. Verlangen wrote: > Check your log for messages about rebuilding indices: that might grow your > dataset some. > > One thing is for sure: the data import removed all the crap that lasted in

Re: design that mimics twitter tweet search

2012-03-19 Thread Chris Goffinet
We do not use Cassandra for search. We made modifications to Lucene. Here is a blog post on our engineering section that talks about what we did: http://engineering.twitter.com/2011/04/twitter-search-is-now-3x-faster_1656.html On Sun, Mar 18, 2012 at 11:22 PM, Tharindu Mathew wrote: > Sasha, >