Re: Newbie ? with get_range_slices

2010-04-11 Thread Benjamin Black
http://wiki.apache.org/cassandra/FAQ#range_ghosts On Sun, Apr 11, 2010 at 5:12 PM, Kevin Wiggen wrote: > > I have spent the last few days playing with Cassandra and I have attempted > to create a simple "Java->Thrift->Cassandra" Discussion Group Server > (because the world needs another one) to t

Re: Questions regarding network topography and automated adminstration

2010-04-11 Thread Eric Evans
On Sat, 2010-04-10 at 10:49 +1200, Todd Nine wrote: > I want the data that is written from the different partitioned > processing nodes (our c# app servers) to be available in both data > centres. I'm assuming I would need an equal number of nodes at each > data centre, then use the RackAwareStrat

Re: RE: Very new user needs some troubleshooting pointers

2010-04-11 Thread Eric Evans
On Fri, 2010-04-09 at 11:28 -0500, Jonathan Ellis wrote: > The jit on debian may take longer to warm up by default. Also, the Debian package will pull in OpenJDK by default, but there is nothing to stop you from using the Sun JVM (which I assume is what's in use on the other machines). It is even

Newbie ? with get_range_slices

2010-04-11 Thread Kevin Wiggen
I have spent the last few days playing with Cassandra and I have attempted to create a simple "Java->Thrift->Cassandra" Discussion Group Server (because the world needs another one) to teach myself the data model and try everything out. With all the great blog posts on cassandra out there, I am

RE: Two dimensional matrices

2010-04-11 Thread Dop Sun
I don't know whether I'm wrong or not (I'm also new to Cassandra). But looks like we only can query a single Super Column at a single query since these values are specified in the ColumnParent parameter. Which means that you only can query a single week or month (as your super column). From: Ph

Two dimensional matrices

2010-04-11 Thread Philippe
Hello, I would like to know if the following is indeed possible with Cassandra, from my understanding of key & column slices it is but I am just beggining to get my head around Cassandra... I have data that is two dimensional, time varying (think of a grid). At each cell of this grid,I store a b

Re: if cassandra isn't ideal for keep track of counts, how does digg count diggs?

2010-04-11 Thread Paul Prescod
On Sun, Apr 11, 2010 at 3:30 AM, Mark Robson wrote: > Can we not implement counts by just storing all the deltas in a row, and > then summing them all up to acheive a count. > > If a row ends up with too many deltas, a reader could just summarise the > deltas occasionally into a single value (in a

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
On Sun, Apr 11, 2010 at 12:10 PM, vineet daniel wrote: > I assume that using the key i can get the all the columns like an array. Now > i'd be using php to extract  arraykey=>value in that array, just want to > avoid that i.e i can directly print the column names. It doesn't work this way. It's

Re: How to perform queries on Cassandra?

2010-04-11 Thread vineet daniel
I am dropping the idea, dont want to irritate you guys more. I've got your points. On Mon, Apr 12, 2010 at 12:41 AM, Benjamin Black wrote: > Just to be clear: do you understand we are saying you need to use > multiple CFs to achieve the goal, not a single one? > > The Users CF would be indexed o

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
Just to be clear: do you understand we are saying you need to use multiple CFs to achieve the goal, not a single one? The Users CF would be indexed on a unique integer as you are saying you intend. There is no point in having values as column names here, other than making things incredibly confus

Re: How to perform queries on Cassandra?

2010-04-11 Thread vineet daniel
I assume that using the key i can get the all the columns like an array. Now i'd be using php to extract arraykey=>value in that array, just want to avoid that i.e i can directly print the column names. If you guys think its not a good idea I can drop it, anyways m new to it and a lot of things ar

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
I have no idea what problem you are trying to solve. You are misunderstanding a number of things about the Cassandra data model and about how we are explaining it is best used. On Sun, Apr 11, 2010 at 11:37 AM, vineet daniel wrote: > Well my initial idea is to use value  as column name, keeping

Re: How to perform queries on Cassandra?

2010-04-11 Thread Paul Prescod
Why do you want to directly read column names as values, and what will you put in the column values? On Sun, Apr 11, 2010 at 11:37 AM, vineet daniel wrote: > Well my initial idea is to use value  as column name, keeping key as an > incremental integer. The discussion after each mail has drifted f

Re: How to perform queries on Cassandra?

2010-04-11 Thread vineet daniel
Well my initial idea is to use value as column name, keeping key as an incremental integer. The discussion after each mail has drifted from this point which I had made. Will put it again. we want to store user information. We keep 1,2,3,4.so on as keys. AND values as column names i.e rather t

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
Row keys must be unique. If your usernames are not unique and you want to be able to query on them, you either need to figure out a way to make them unique or treat the username rows themselves as indices, which refer to a set of actually unique identifiers for users. On Sun, Apr 11, 2010 at 11:1

Re: How to perform queries on Cassandra?

2010-04-11 Thread Paul Prescod
Benjamin is pointing out that you must be using the word "username" to mean something different than he is using it. BY DEFINITION usernames are unique in the most common use of the word. So what do you really mean if not "username"? On Sun, Apr 11, 2010 at 11:12 AM, vineet daniel wrote: > its n

Re: How to perform queries on Cassandra?

2010-04-11 Thread vineet daniel
its not a problem its a scenario, which we need to handle. And all I am trying to do is to achieve what is not there with API i.e a workaroud. On Sun, Apr 11, 2010 at 11:06 PM, Benjamin Black wrote: > A system that permits multiple people to have the same username has a > serious problem. > > On

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
A system that permits multiple people to have the same username has a serious problem. On Sun, Apr 11, 2010 at 6:12 AM, vineet daniel wrote: > How to handle same usernames. Otherwise seems fine to me. > > On Sun, Apr 11, 2010 at 6:17 PM, Dop Sun wrote: >> >> Hi, >> >> >> >> As far as I can see i

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
Ah, I see what you are doing. No, that won't work. The mistake you are making is in thinking a CF is a table and that Cassandra is storing columns. A CF is a namespace and Cassandra stores key/value pairs, where the keys are the row keys and the values are maps: 'usr1': {'password':'foo', 'thin

RE: How to perform queries on Cassandra?

2010-04-11 Thread Dop Sun
While we are talking same user names, it’s the application design to help figuring out the difference on other attributes (actually, it’s not Cassandra related, it’s application/ domain issue): Let’s say there are two scenarios (let me know if there are more): 1. The identity behind t

Re: How to perform queries on Cassandra?

2010-04-11 Thread vineet daniel
How to handle same usernames. Otherwise seems fine to me. On Sun, Apr 11, 2010 at 6:17 PM, Dop Sun wrote: > Hi, > > > > As far as I can see it, the Cassandra API currently supports criterias on: > > Token – Key – Super Column Name (if applicable) - Column Names > > > > I guess Token is not usua

RE: How to perform queries on Cassandra?

2010-04-11 Thread Dop Sun
Hi, As far as I can see it, the Cassandra API currently supports criterias on: Token – Key – Super Column Name (if applicable) - Column Names I guess Token is not usually used for the day to day queries, so, Key and Column Names are normally used for querying. For the user name and passwo

Re: concept to query cassandra

2010-04-11 Thread Lucifer Dignified
It was just an example to showcase how i want to implement it, and I have even added that this entierly depends upon what you want and what the scenario is, i'm thinking of using this for articles that we are storing, and the number is big. thinking of making each values as column name itself. Onc

Re: if cassandra isn't ideal for keep track of counts, how does digg count diggs?

2010-04-11 Thread Mark Robson
Can we not implement counts by just storing all the deltas in a row, and then summing them all up to acheive a count. If a row ends up with too many deltas, a reader could just summarise the deltas occasionally into a single value (in a way which avoids race conditions, of course). So you'd map

Re: concept to query cassandra

2010-04-11 Thread Mark Robson
On 11 April 2010 07:59, Lucifer Dignified wrote: > For a very simple query wherin we need to check username and password I > think keeping incremental numeric id as key and keeping the name and value > same in the column family should work. > It is highly unlikely that your application has enou

Re: How to perform queries on Cassandra?

2010-04-11 Thread Lucifer Dignified
Hi Benjamin I'll try to make it more clear to you. We have a user table with fields 'id', 'username', and 'password'. Now if use the ideal way to store key/value, like : username : vineetdaniel timestamp password : timestamp second user : username: timestamp password: and so on, here what i a

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
Sorry, I don't understand your example. On Sun, Apr 11, 2010 at 12:54 AM, Lucifer Dignified wrote: > Benjamin I quite agree to you, but what in case of duplicate usernames, > suppose if I am not using unique names as in email id's . If we have > duplicacy in usernames we cannot use it for key, so

Re: How many KeySpace will you use in a single application?

2010-04-11 Thread Lucifer Dignified
Dop You can help us all by sharing your experiences here, so that new users dont face the same problem : A group to bring all HA force together (help the effort) http://www.facebook.com/groups/edit.php?edit_members&gid=116428271708033#!/group.php?gid=116428271708033 On Sat, Apr 10, 2010 at 8:19

concept to query cassandra

2010-04-11 Thread Lucifer Dignified
Hi I've been thinking of using cassandra for our existing application, which has a very complex RDBMS schema as of now, and we need to make a lot of queries using joins and where. Whereas we can eliminate joins by using duplicate entries, its still hard to query cassandra. I have thought of a way

Re: How to perform queries on Cassandra?

2010-04-11 Thread Lucifer Dignified
Benjamin I quite agree to you, but what in case of duplicate usernames, suppose if I am not using unique names as in email id's . If we have duplicacy in usernames we cannot use it for key, so what should be the solution. I think keeping incremental numeric id as key and keeping the name and value

Re: How to perform queries on Cassandra?

2010-04-11 Thread Benjamin Black
You would have a Column Family, not a column for that; let's call it the Users CF. You'd use username as the row key and have a column called 'password'. For your example query, you'd retrieve row key 'usr2', column 'password'. The general pattern is that you create CFs to act as indices for eac

Re: if cassandra isn't ideal for keep track of counts, how does digg count diggs?

2010-04-11 Thread Boris Shulman
What will be the latency for the zk based atomic increase? On Tue, Apr 6, 2010 at 8:22 PM, Chris Goffinet wrote: > http://issues.apache.org/jira/browse/CASSANDRA-704 > http://issues.apache.org/jira/browse/CASSANDRA-721 > We have our own internal codebase of Cassandra at Digg. But we are using > t