cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Di Pentima <br...@di-pentima.com.ar>
Subject Presentation, CQL 3 and Paging
Date Tue, 17 Jul 2012 15:54:26 GMT
Hello all!

I'm new to Cassandra and the list. Still learning and testing basic stuff. I've got a couple
of questions which I'm hoping you could help me with.

I'm currently using Cassandra 1.1.1 and CQL Spec 3. 

My schema consists of a table which represents a user list with with their according properties
(country, last_login_date, email, birthdate, name, etc). I've created a composite key on the
columns I always query (country and last_login_date  [plus email as the unique part of the
key]). If I understand correctly, this generates a wide row Columnfamily where the partition
key is the country and the remaining parts of the composite (last_login_date and email) are
used for clustering the data... basically each row will represent a country, and each column
of a particular row will represent the data of a single user. 
What I need querying this Columnfamily is a random list of X users from Y country which have
logged in in the last Z months. So...
1) Is there an approach to randomly getting a User? Right now I'm doing all this in the receiving
end... I retrieve all the corresponding Users and then select a random portion of them.
2) Unless I'm missing something there's now way to page a query using CQL. Some of my queries
returns a high volume of data and I don't have enough RAM. Do I have to use the Thrift API
or are there other high level libraries which I could use (I'm using Ruby so I'm looking into
Twitter's Cassandra gem but I've not found yet a way to do this with it)

Thanks in advance. Hope I made myself understood... English is not my primary language :)

Best,

-- Bruno Di Pentima
Santa Fe, Argentina





Mime
View raw message