Re: Map return for multiget_slice() query

2010-01-13 Thread Joe Stump
I ran into this problem in Python because dict's aren't ordered in Python. Not sure if that applies here. --Joe On Jan 12, 2010, at 2:22 AM, Richard Grossman wrote: Hi I've a simple CF like this : ColumnFamily CompareWith=BytesType Name=channelShow

Re: Data Model Index Text

2010-01-13 Thread Ryan Daum
On the topic of Lucandra, apart from having it work with 0.5 of Cassandra, has any work been done to get it up to date with Lucene 2.9/3.0? Also, I'm a bit concerned about its use of OrderPreservingPartitioner; is there an architecture for storage that could be considered that would work with

Re: Cassandra and TTL

2010-01-13 Thread Ryan Daum
Just to speak up here, I think it's a more common use-case than you're imagining, eve if maybe there's no reasonable way of implementing it. I for one have plenty of use for a TTL on a key, though in my case the TTL would be in days/weeks. Alternatively, I know it's considered wrong, but having

Re: easy interface to Cassandra

2010-01-13 Thread Ted Zlatanov
On Wed, 13 Jan 2010 08:05:45 +1300 Michael Koziarski mich...@koziarski.com wrote: I see no value in pushing for ports of a Perl library to other languages instead of allowing each to grow its own idiomatic one. MK That's definitely the way to go, the Easy.pm magic strings look a MK little

Re: Can fix corrupt file? (Compaction step)

2010-01-13 Thread Jonathan Ellis
What is your CF definition in your config file? On Sun, Jan 10, 2010 at 7:59 PM, JKnight JKnight beukni...@gmail.com wrote: The attachment contains data that raise error in compact step. Could you help me to detect the problem?

Re: Data Model Index Text

2010-01-13 Thread ML_Seda
I'm assuming I have to run the thrift gen-java from cassandra .4 release. Is there any documentation or tutorial on how to get that up and running? I've checked both cassandra and lucandra into eclipse, but the lucandra project is still unable to resolve some Classes. This is because I need to

Re: How to UUID in .Net

2010-01-13 Thread Nguyễn Minh Kha
Thank Jonathan, I will try to port to C Sharp. On Sat, Jan 9, 2010 at 7:47 AM, Jonathan Ellis jbel...@gmail.com wrote: I didn't see any C# libraries that generate type 1 UUIDs. You might have to port this one from java: http://johannburkard.de/software/uuid/ 2010/1/8 Nguyễn Minh Kha

Re: Data Model Index Text

2010-01-13 Thread Jonathan Ellis
On Wed, Jan 13, 2010 at 10:04 AM, ML_Seda sonnyh...@gmail.com wrote: I'm assuming I have to run the thrift gen-java from cassandra .4 release.  Is there any documentation or tutorial on how to get that up and running? No, cassandra includes a copy of the thrift Java classes. You don't need to

Re: Data Model Index Text

2010-01-13 Thread Jake Luciani
You should be using the ant file to build lucandra, see README. For eclipse you need to add lucandra/gen-java to src path (this contains the thrift stubs). -Jake On Wed, Jan 13, 2010 at 11:04 AM, ML_Seda sonnyh...@gmail.com wrote: I'm assuming I have to run the thrift gen-java from cassandra

Re: Data Model Index Text

2010-01-13 Thread Jake Luciani
Ah, yes. I made this change locally once. let me try to find it. On Wed, Jan 13, 2010 at 10:43 AM, Ryan Daum r...@thimbleware.com wrote: The only tricky point I saw with 3.0 Lucene switch was that the TokenStream API changed completely, and IndexWriter in your code depended on the old API.

Tuning and upgrades

2010-01-13 Thread Anthony Molinaro
Hi, So after several days of more close examination, I've discovered something. EC2 io performance is pretty bad. Well okay, we already all knew that, and I have no choice but to deal with it, as moving at this time is not an option. But what I've really discovered is my data is unevenly

Re: How to UUID in .Net

2010-01-13 Thread Tatu Saloranta
2010/1/13 Nguyễn Minh Kha nminh...@gmail.com: Thank Jonathan, I will try to port to C Sharp. If you need to port something, could have a look at better uuid packages. JUG (Java Uuid Generator) is simple, jakarta-commons has one, and there was a third one as well that claimed mostly be slightly

Re: Cassandra and TTL

2010-01-13 Thread Tatu Saloranta
On Wed, Jan 13, 2010 at 6:18 AM, Ryan Daum r...@thimbleware.com wrote: Just to speak up here, I think it's a more common use-case than you're imagining, eve if maybe there's no reasonable way of implementing it. I for one have plenty of use for a TTL on a key, though in my case the TTL would

Re: How to UUID in .Net

2010-01-13 Thread Jonathan Ellis
I'm pretty sure that when I tested JUG it generated broken type 1 UUIDs. On Wed, Jan 13, 2010 at 3:14 PM, Tatu Saloranta tsalora...@gmail.com wrote: 2010/1/13 Nguyễn Minh Kha nminh...@gmail.com: Thank Jonathan, I will try to port to C Sharp. If you need to port something, could have a look at

Re: How to UUID in .Net

2010-01-13 Thread Jonathan Ellis
Actually (hitting Send jogs my memory :) it was that it does lexical compares which is invalid on type 1. So be careful. :) On Wed, Jan 13, 2010 at 3:36 PM, Jonathan Ellis jbel...@gmail.com wrote: I'm pretty sure that when I tested JUG it generated broken type 1 UUIDs. On Wed, Jan 13, 2010 at

Re: Tuning and upgrades

2010-01-13 Thread Anthony Molinaro
Hi Jonathon, Thanks for all the information. I just noticed one difference in the .thrift file between 0.4.1 and 0.4.2, the call to get_slice had an exception removed. Does this mean I have to have all my clients rebuilt? (I'm not excactly sure of what sorts of things are backwards

Re: Tuning and upgrades

2010-01-13 Thread Jonathan Ellis
On Wed, Jan 13, 2010 at 4:19 PM, Anthony Molinaro antho...@alumni.caltech.edu wrote: Hi Jonathon,  Thanks for all the information.  I just noticed one difference in the .thrift file between 0.4.1 and 0.4.2, the call to get_slice had an exception removed.  Does this mean I have to have all

Re: Cassandra and TTL

2010-01-13 Thread Mark Robson
I also agree: Some mechanism to expire rolling data would be really good if we can incorporate it. Using the existing client interface, deleting old data is very cumbersome. We want to store lots of audit data in Cassandra, this will need to be expired eventually. Nodes should be able to do

Re: Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

2010-01-13 Thread Jonathan Ellis
It's correct, if understood correctly. We should probably just remove it since it's confusing as written. What it means is, if a write for a given row is acked, eventually, _all_ the data updated _in that row_ will be available for reads. So no, it's not atomic at the batch_mutate level but at

Re: Cassandra and TTL

2010-01-13 Thread Kelvin Kakugawa
An alternative implementation that may be worth exploring would be to modify IColumn's isMarkedForDelete() method to check TTL. It probably wouldn't be as performant as straight dropping SSTables. You'd probably also need to periodically compact old tables to remove expired rows. However, on the

Re: Cassandra and TTL

2010-01-13 Thread Jonathan Ellis
I think that is more or less what Sylvain is proposing. The main downside is adding the extra 8 bytes for a long (or 4 for an int, which should actually be plenty of resolution for this use case) to each Column object. On Wed, Jan 13, 2010 at 4:57 PM, Kelvin Kakugawa kakug...@gmail.com wrote:

Re: How to UUID in .Net

2010-01-13 Thread Tatu Saloranta
On Wed, Jan 13, 2010 at 1:37 PM, Jonathan Ellis jbel...@gmail.com wrote: Actually (hitting Send jogs my memory :) it was that it does lexical compares which is invalid on type 1.  So be careful. :) Ah. I would be VERY surprised if it produced invalid ones (I wrote the thing years ago :) ).

Re: How to UUID in .Net

2010-01-13 Thread Jonathan Ellis
Checked the source, yes, it does do timestamp first. Sorry for the misinformation, I must be thinking of something else entirely. It's been a while. :) -Jonathan On Wed, Jan 13, 2010 at 5:09 PM, Tatu Saloranta tsalora...@gmail.com wrote: On Wed, Jan 13, 2010 at 1:37 PM, Jonathan Ellis

Re: Cassandra and TTL

2010-01-13 Thread Kelvin Kakugawa
Are you thinking about storing the expiration time explicitly? Or, would it be reasonable to calculate it dynamically? -Kelvin On Wed, Jan 13, 2010 at 1:01 PM, Jonathan Ellis jbel...@gmail.com wrote: I think that is more or less what Sylvain is proposing.  The main downside is adding the

Re: Cassandra and TTL

2010-01-13 Thread Jonathan Ellis
If he needs column-level granularity then I don't see any other option. If he needs CF-level granularity then truncate will work fine. :) On Wed, Jan 13, 2010 at 5:16 PM, Kelvin Kakugawa kakug...@gmail.com wrote: Are you thinking about storing the expiration time explicitly?  Or, would it be

Re: Cassandra and TTL

2010-01-13 Thread Kelvin Kakugawa
You're right, if the TTL will be dynamically set, then we'd need to make room for it. Otherwise, if it's globally set, we could save that space. -Kelvin On Wed, Jan 13, 2010 at 1:16 PM, Kelvin Kakugawa kakug...@gmail.com wrote: Are you thinking about storing the expiration time explicitly?  

Re: Tuning and upgrades

2010-01-13 Thread Anthony Molinaro
So the answer is java handles it fine. However, I unfortunately wasn't able to do a rolling restart, for whatever reason the first node caused all the other nodes to start throwing exceptions, so I had to take everything down for a little bit. However, 0.4.2 seems to start faster than 0.4.1, so

Re: Tuning and upgrades

2010-01-13 Thread Anthony Molinaro
Also, I notice in 0.5.0 cassandra.in.sh you have -XX:SurvivorRatio=8 \ then further down in the file -XX:SurvivorRatio=128 \ Does the second end up winning? Or is there some magic here. -Anthony On Wed, Jan 13, 2010 at 04:02:48PM -0800, Anthony Molinaro wrote: So the answer is java

Re: How to UUID in .Net

2010-01-13 Thread Tatu Saloranta
On Wed, Jan 13, 2010 at 3:13 PM, Jonathan Ellis jbel...@gmail.com wrote: Checked the source, yes, it does do timestamp first.  Sorry for the misinformation, I must be thinking of something else entirely.  It's been a while. :) Not at all, thanks for checking it. I might have mis-recalled it as

Re: Cassandra and TTL

2010-01-13 Thread Ryan Daum
On Wed, Jan 13, 2010 at 6:19 PM, Jonathan Ellis jbel...@gmail.com wrote: If he needs column-level granularity then I don't see any other option. If he needs CF-level granularity then truncate will work fine. :) Are you saying the proposed truncate functionality will support the functionality

Re: Tuning and upgrades

2010-01-13 Thread Jonathan Ellis
On Wed, Jan 13, 2010 at 6:02 PM, Anthony Molinaro antho...@alumni.caltech.edu wrote: So is the thrift interface for 0.5.0 compatible with that of 0.4.x or do I need to upgrade clients for that upgrade? Just exceptions have changed. (And get_range_slice was added.) -Jonathan

Re: Tuning and upgrades

2010-01-13 Thread Jonathan Ellis
Good question. :) On Wed, Jan 13, 2010 at 6:19 PM, Anthony Molinaro antho...@alumni.caltech.edu wrote: Also, I notice in 0.5.0 cassandra.in.sh you have  -XX:SurvivorRatio=8 \ then further down in the file  -XX:SurvivorRatio=128 \ Does the second end up winning?  Or is there some magic

Re: Cassandra guarantees reads and writes to be atomic within a single ColumnFamily.

2010-01-13 Thread Ran Tavory
Thanks, so maybe to rephrase: Cassandra guarantees reads and writes to be atomic within a single row. But this isn't saying much... so maybe just take it off... On Thu, Jan 14, 2010 at 12:40 AM, Jonathan Ellis jbel...@gmail.com wrote: It's correct, if understood correctly. We should

Re: Cassandra and TTL

2010-01-13 Thread August Zajonc
On Wed, Jan 13, 2010 at 2:30 PM, Mark Robson mar...@gmail.com wrote: I also agree: Some mechanism to expire rolling data would be really good if we can incorporate it. Using the existing client interface, deleting old data is very cumbersome. We want to store lots of audit data in Cassandra,