how to delete data

2010-03-24 Thread Ran Tavory
What's the recommended way to delete data? For example, I want to wipe out an entire column family data from disk with minimal effort. I could: 1. stop all hosts in the cluster 2. restart them until they finish playing commit logs 3. stop them again 4. delete all CF related files in my

Re: Frustrations installing Cassandra on Windows

2010-03-24 Thread Christopher Brind
I don't know if there's some difference between building on Mac and Windows, but I just tried building from the latest git repo and that was fine. I also downloaded and built the 0.6 src tar ball from apache-cassandra-0.6.0-beta3-src.tar.gz

Slice Query

2010-03-24 Thread Colin Vipurs
Hi all, I've just started playing with Cassandra and investigating if it's useful for us, so please be gentle when I ask silly questions :). When user super columns is it possible to perform a slice operation to pull out all SC's/Keys that match a specific/range of column names? Putting it more c

'Tearing down' a test database

2010-03-24 Thread Philip Jackson
Hi, Just trying out Cassandra (0.5), looks great so far but I've got a question about removing data: For my test suite I would like to be able to build-up data in the database and then have the test framework tear it all back down again. Trouble is, if I do a batch_insert, remove, batch_insert (o

Re: how to delete data

2010-03-24 Thread Jonathan Ellis
Currently there is no good way to do this. We're planning to add "truncate" support in https://issues.apache.org/jira/browse/CASSANDRA-531, let me know if you want to work on that. :) -Jonathan On Wed, Mar 24, 2010 at 4:03 AM, Ran Tavory wrote: > What's the recommended way to delete data? > For

Re: Slice Query

2010-03-24 Thread Jonathan Ellis
On Wed, Mar 24, 2010 at 4:57 AM, Colin Vipurs wrote: > Could I get all keys/supercolumns where 'Column1' exists? fyi I'm > using the Hector Java client for my work. Not servir-side, no. -Jonathan

Re: 'Tearing down' a test database

2010-03-24 Thread Jonathan Ellis
The 2nd insert needs to have a timestamp higher than the remove. On Wed, Mar 24, 2010 at 7:10 AM, Philip Jackson wrote: > Hi, > > Just trying out Cassandra (0.5), looks great so far but I've got a > question about removing data: > > For my test suite I would like to be able to build-up data in th

Re: Slice Query

2010-03-24 Thread Jeremy Dunck
On Wed, Mar 24, 2010 at 4:57 AM, Colin Vipurs wrote: ... > ColumnFamily { >   'key1' { >      'SuperColumn1' { >         'Column1' : >         'Column2' : >      } >      'SuperColumn2' { >         'Column3' : >      } >   } >   'key2' { >      'SuperColumn1' { >         'Column1' : >      } >

Which client API to choose?

2010-03-24 Thread Roland Hänel
Hi, First of all, thanks all of you guys who are contributing to this amazing project. I've been looking at Cassandra for a couple of days now, and I'm still impressed by the whole thing. However, it wasn't all that straight-forward getting my first "hello world" programs to run with Cassandra. A

Re: Slice Query

2010-03-24 Thread Colin Vipurs
I'm not doing schema migration, but I suspect my lack of experience and understanding of column-based data is clouding the issue. What I have is 2 pieces of information, let's call them LH and RH and a single long value representing the link between them, S. The data needs to be ordered by S, so

NullPointerException in DatabaseDescriptor.getComparator

2010-03-24 Thread Oleg Mürk
Hello, I am having the following problem with Cassandra. When I first start Cassandra, it works fine and I insert some data, but when I kill cassandra and then start it again, it starts throwing NullPointerException (into log4j). When I restart Cassandra once more, it doesn't throw the exception (

Re: NullPointerException in DatabaseDescriptor.getComparator

2010-03-24 Thread Jonathan Ellis
probably 0.5.1 is allowing an invalid query and erroring out when it actually runs it. 0.6 beta3 should catch the problem earlier. On Wed, Mar 24, 2010 at 9:28 AM, Oleg Mürk wrote: > Hello, > I am having the following problem with Cassandra. When I first start > Cassandra, it works fine and I in

Re: NullPointerException in DatabaseDescriptor.getComparator

2010-03-24 Thread Oleg Mürk
Hi Jonathan, On Wed, Mar 24, 2010 at 4:32 PM, Jonathan Ellis wrote: > probably 0.5.1 is allowing an invalid query and erroring out when it > actually runs it. I am pretty sure that the same query works OK when I initially start Cassandra. The problems occur after restarting. Oleg

Re: Which client API to choose?

2010-03-24 Thread Ned Wolpert
I recommend Hector myself. I've been using it inside a groovy plugin and it works well. Also, it abstracts out the connection to Cassandra, gives you the ability to pool resources, etc. Think of thrift as JDBC, and Hector as PoolMan. (if anyone remembers that wonderful project) You're still basica

Re: Which client API to choose?

2010-03-24 Thread Eric Evans
On Wed, 2010-03-24 at 14:15 +0100, Roland Hänel wrote: > Still, I'm somewhat confused which API to choose if I was heading for > a > bigger project > > 1. plain Thrift (for Java)? > Seems the major advantage is that Thrift is available in many > languages, but > if I'm only interested in Java that

Re: Which client API to choose?

2010-03-24 Thread Ran Tavory
I concur with Eric, as hector developer it's easier to develop separately (github) plus competition keeps us healthy ;) On Wed, Mar 24, 2010 at 5:38 PM, Eric Evans wrote: > On Wed, 2010-03-24 at 14:15 +0100, Roland Hänel wrote: > > Still, I'm somewhat confused which API to choose if I was headin

Re: NullPointerException in DatabaseDescriptor.getComparator

2010-03-24 Thread gabriele renzi
On Wed, Mar 24, 2010 at 3:36 PM, Oleg Mürk wrote: > Hi Jonathan, > > On Wed, Mar 24, 2010 at 4:32 PM, Jonathan Ellis wrote: >> >> probably 0.5.1 is allowing an invalid query and erroring out when it >> actually runs it. > > I am pretty sure that the same query works OK when I initially start > Ca

Re: NullPointerException in DatabaseDescriptor.getComparator

2010-03-24 Thread Jonathan Ellis
Ah, you're right. So it is a validation problem that 0.6 catches, just not the one I thought at first. :) On Wed, Mar 24, 2010 at 10:50 AM, gabriele renzi wrote: > On Wed, Mar 24, 2010 at 3:36 PM, Oleg Mürk wrote: >> Hi Jonathan, >> >> On Wed, Mar 24, 2010 at 4:32 PM, Jonathan Ellis wrote: >>>

Re: Which client API to choose?

2010-03-24 Thread Tatu Saloranta
On Wed, Mar 24, 2010 at 8:45 AM, Ran Tavory wrote: > I concur with Eric, as hector developer it's easier to develop separately > (github) plus competition keeps us healthy ;) Enthusiastic +1 for this :) (both for proper layering to allow different levels of abstraction, and for goodness of some c

Re: Which client API to choose?

2010-03-24 Thread Peter Chang
Hector is the way to go if you're using java. I'm using it right now and it's made things worlds easier. The reason why it wasn't bundled was because it's a separate and relatively new project. I think it's under a month old and it was done by a lone developer (Ran). Also, the Cassandra project wa

Re: how to delete data

2010-03-24 Thread Scott White
Not that this is much better, but can't you replace steps 1-2 with nodeprobe -flush ? On Wed, Mar 24, 2010 at 2:03 AM, Ran Tavory wrote: > What's the recommended way to delete data? > For example, I want to wipe out an entire column family data from disk with > minimal effort. > I could: > >

Auto Increament

2010-03-24 Thread Jaepil Jeong
Hi there, I just started research about Cassandra to replace MySQL, and I have a question: How can I replace the "auto increament" attribute in MySQL with Cassandra? If I can't, how can I generate an ID which is globally unique for each of columns? Thanks, Sent from my iPhone

Re: Which client API to choose?

2010-03-24 Thread Roland Hänel
Thanks a lot for these suggestions. My fat client issues came mainly from the fact that the Wiki example ( http://wiki.apache.org/cassandra/ClientExamples) just doesn't work with 0.6.0beta3. - StorageService.instance() does not work because instance is a static variable, not a method -

Re: 'Tearing down' a test database

2010-03-24 Thread Nathan McCall
Take a look at EmbeddedServerHelper in the hector client for an example of how this is managed through a test case: http://github.com/rantav/hector/blob/master/src/test/java/me/prettyprint/cassandra/testutils/EmbeddedServerHelper.java -Nate On Wed, Mar 24, 2010 at 5:10 AM, Philip Jackson wrote:

Re: Auto Increament

2010-03-24 Thread Jeremy Dunck
http://en.wikipedia.org/wiki/Uuid ? On Wed, Mar 24, 2010 at 11:57 AM, Jaepil Jeong wrote: > Hi there, > > I just started research about Cassandra to replace MySQL, and I have a > question: How can I replace the "auto increament" attribute in MySQL > with Cassandra? If I can't, how can I generate

Re: Auto Increament

2010-03-24 Thread Sylvain Lebresne
> How can I replace the "auto increament" attribute in MySQL > with Cassandra? You can't. Not easily at least. > If I can't, how can I generate an ID which is globally > unique for each of columns? Check UUIDs: http://en.wikipedia.org/wiki/Universally_Unique_Identifier > > Thanks, > > Sent from

Re: Auto Increament

2010-03-24 Thread Sylvain Lebresne
On Wed, Mar 24, 2010 at 6:22 PM, Jeremy Dunck wrote: > http://en.wikipedia.org/wiki/Uuid > ? Yes sorry, I have copied the link from what google returned me, but it was not the right link apparently. > > On Wed, Mar 24, 2010 at 11:57 AM, Jaepil Jeong wrote: >> Hi there, >> >> I just started rese

Re: 'Tearing down' a test database

2010-03-24 Thread Ran Tavory
actually in 0.6.0 I committed this to trunk: http://svn.apache.org/repos/asf/cassandra/trunk/contrib/javautils/src/main/java/org/apache/cassandra/contrib/utils/service/CassandraServiceDataCleaner.java So it's quite similar to what I you have in hector. A few words of warning though: - this wipes o

Re: how to delete data

2010-03-24 Thread Ran Tavory
I'm willing to give it a try. Where do I start, except for applying the patch in the bug? On Wed, Mar 24, 2010 at 2:30 PM, Jonathan Ellis wrote: > Currently there is no good way to do this. We're planning to add > "truncate" support in > https://issues.apache.org/jira/browse/CASSANDRA-531, let

php and TimeUUID

2010-03-24 Thread Arjen Schat
Hi All, Who can provide a working example of a TimeUUID implementation in php? I either get TException: UUIDs must be exactly 16 bytes or TException: TimeUUID only makes sense with version 1 UUIDs I tried the Fredrik Lindberg - http://www.shapeshifter.se UUID class, but no option generates the r

Re: Auto Increament

2010-03-24 Thread Jesus Ibanez
You can generate UUIDs based on time with http://jug.safehaus.org/ if you use Java. And its easy to use, just have to insert one line: UUID uuid = UUIDGenerator.getInstance().generateTimeBasedUUID(); Maybe a solution to your cuestion: To "replace" the autoincrement of MySQL, you can create a colu

Re: Auto Increament

2010-03-24 Thread Erik Holstad
On Wed, Mar 24, 2010 at 11:00 AM, Jesus Ibanez wrote: > You can generate UUIDs based on time with http://jug.safehaus.org/ if you > use Java. And its easy to use, just have to insert one line: > UUID uuid = UUIDGenerator.getInstance().generateTimeBasedUUID(); > > Maybe a solution to your cuestion:

Re: php and TimeUUID

2010-03-24 Thread Jeremy Dunck
There's been some discussion of php TimeUUID on this list previously -- search the archives. Most recently, this might help: http://code.google.com/p/simpletools-php/source/browse/trunk/SimpleCassie.php (Google Code seems a bit unsteady at the moment.) On Wed, Mar 24, 2010 at 12:59 PM, Arjen Sch

Re: Which client API to choose?

2010-03-24 Thread Jonathan Ellis
Should we just remove that from the wiki, seeing as how we have the same (?) sample in contrib/ where it is more likely to be kept up to date? 2010/3/24 Roland Hänel : > Thanks a lot for these suggestions. > > My fat client issues came mainly from the fact that the Wiki example > (http://wiki.apac

Re: php and TimeUUID

2010-03-24 Thread Jonathan Ellis
SimpleCassie linked from http://wiki.apache.org/cassandra/ClientExamples does time uuids, so you could either use that or check its code to see what it's doing. On Wed, Mar 24, 2010 at 12:59 PM, Arjen Schat wrote: > Hi All, > Who can provide a working example of a TimeUUID implementation in php?

Re: Deleting and re-inserting row causes error in get_slice count parameter

2010-03-24 Thread Jonathan Ellis
Are you using 0.5.0? Because this sounds like a bug that was fixed in 0.5.1. On Mon, Mar 22, 2010 at 5:13 PM, Bob Florian wrote: > I'm new to Cassandra and have run into a problem that I think is a > bug, but wanted to get some feedback in case I'm misunderstanding > something. > > I've found th

Re: memory question

2010-03-24 Thread Jonathan Ellis
did you check jmx to see if a compaction is going on? On Mon, Mar 22, 2010 at 5:14 PM, Todd Burruss wrote: > after running my cluster for a while performance has become unacceptable, > 200+ ms for reads.  if running well, i see reads <10ms.  when i run iostat > the disk is being hammered by reads

Re: get_range_slice(s) question

2010-03-24 Thread Jack Culpepper
Did a ticket get opened for this? I am able to duplicate it. Jack On Fri, Mar 12, 2010 at 11:57 AM, Jonathan Ellis wrote: > That would be a bug, not intended behavior.  Can you open a ticket? > > On Fri, Mar 12, 2010 at 11:48 AM, Omer van der Horst Jansen > wrote: >> I've noticed that both 0.5.

Re: get_range_slice(s) question

2010-03-24 Thread Brandon Williams
On Wed, Mar 24, 2010 at 3:24 PM, Jack Culpepper wrote: > Did a ticket get opened for this? I am able to duplicate it. Yes, and fixed for 0.6: http://issues.apache.org/jira/browse/CASSANDRA-884 -Brandon

Model Question

2010-03-24 Thread Erez Efrati
Hi, I can't figure out how to use model the following using column family and the way the columns are sorted (by their name). Lets say I have a list of users and for each user I wish to display a list of all the friends he has ordered by the number of messages they sent him so far (desc from most

Re: get_range_slice(s) question

2010-03-24 Thread Jonathan Ellis
Omer opened https://issues.apache.org/jira/browse/CASSANDRA-884, which was fixed in 0.6 svn (after beta3 was tagged). On Wed, Mar 24, 2010 at 3:24 PM, Jack Culpepper wrote: > Did a ticket get opened for this? I am able to duplicate it. > > Jack > > On Fri, Mar 12, 2010 at 11:57 AM, Jonathan Ellis

Limit on number of columns

2010-03-24 Thread Davis, Jeremy
Hello, Is there a practical limit on the number of columns I put on a key? Obviously if I tried to grab the entire row at once I would have a problem. However, if I had an open ended row, with column names of "1" to "9" etc. And I only accessed ranges, would there be a practical limit I w

Re: Limit on number of columns

2010-03-24 Thread Jesse McConnell
http://wiki.apache.org/cassandra/CassandraLimitations "Cassandra's compaction code currently deserializes an entire row (per columnfamily) at a time. So all the data from a given columnfamily/key pair must fit in memory. Fixing this is relatively easy since columns are stored in-order on disk so t

RE: Frustrations installing Cassandra on Windows

2010-03-24 Thread Raymond Wilson
Is there a target data for 0.6-final? Raymond. -Original Message- From: Jonathan Ellis [mailto:jbel...@gmail.com] Sent: Wednesday, 24 March 2010 4:29 p.m. To: user@cassandra.apache.org Subject: Re: Frustrations installing Cassandra on Windows On Tue, Mar 23, 2010 at 9:49 PM, Raymond Wil

RE: Frustrations installing Cassandra on Windows

2010-03-24 Thread Raymond Wilson
I tried removing the ivy folder in \users\rwilson and then just running ant in the Cassandra folder. This appeared to be working until it complained about the same issue with resolving dependencies L I tried deleting the ivy jar file I downloaded via Google and rant Ant again. This time

Re: Model Question

2010-03-24 Thread Christopher Brind
Hi Erez, Don't know how many friends a user in your system is likely to have, but are they likely to have received so many messages from friends that you can't sort it in your client app? See: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#sort(java.util.List) Assuming the us

Re: Auto Increament

2010-03-24 Thread Peter Chang
It seems that this scheme would suffer under a race condition. On Wed, Mar 24, 2010 at 11:00 AM, Jesus Ibanez wrote: > You can generate UUIDs based on time with http://jug.safehaus.org/ if you > use Java. And its easy to use, just have to insert one line: > UUID uuid = UUIDGenerator.getInstance()

Re: Model Question

2010-03-24 Thread Peter Chang
If there's not much overhead, I recommend client side as well. Otherwise, you can only sort on column. Therefore, you could create some sort of inverted index based on the message count. User 1 sent 50 messages. User 2 sent 10 messages. User 3 sent 25 messages. Then store a separate index that l

RE: Frustrations installing Cassandra on Windows

2010-03-24 Thread Raymond Wilson
It turns out the issue is that I needed to set up a proxy via ANT_OPTS. This seems to work now, even though the last thing the ant job does is say the build failed, it does appear to set everything up and Cassandra runs up and I can connect to it via Cassandra-cli Thanks, Raymond. Fr

Re: Auto Increament

2010-03-24 Thread Jesus Ibanez
- Where do you get the last inserted column from? - The first result of using get_slice method of thrift, would be the super column with highest value in the name, becouse the configuration of the column family of type super says that the super columns will be decresent ordered (if Cassandra doesn'

Re: Auto Increament

2010-03-24 Thread Muhammed Nasrullah
You replace it with an UUID. In a true scalable distributed system, you should not have an auto_increment. If you are writing to 10 nodes simultaneously, it becomes near impossible to keep a single incrementing value being used by the entire system without causing a lot of write contention. This i

Generated code for csharp thrift interface for Cassandra

2010-03-24 Thread Raymond Wilson
I am looking implementing support for talking to Cassandra from within a piece of software written in Delphi . For reference purposes, the generated csharp code for the Cassandra Thrift API would be very useful. Does anyone on the list have this generated code they could send my way? Th

Re: Generated code for csharp thrift interface for Cassandra

2010-03-24 Thread Jonathan Ellis
You really want to write a Thrift Delphi generator, rather than porting the generated code directly. The generated Java code for Cassandra is almost 3 loc. The java Thrift generator is 3700. (The csharp generator is 1700, probably mostly due to not having to deal with checked exceptions, and