incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshan Dawrani <roshandawr...@gmail.com>
Subject I have TimeUUID sorted keys. Can I get the range query return rows in the same order as sorted keys?
Date Mon, 27 Dec 2010 03:34:19 GMT
Hi,
I have the following 2 column families - one being used to store full rows
for an entity and other is an index table for having the TimeUUID sorted row
keys.

I am able to query the TimeUUID columns under the super column fine. But now
I need to go to main CF and get the data and I want the rows in the same
time order as the keys.

I am using MultiGetSliceQuery to query the main entity data for the sorted
keys, but the rows don't come back in the same order, which defeats the
purpose of storing the time sorted subcolumns. I suppose for each key, I can
fire an individual SliceQuery, but that does not look efficient to me. I do
want to fire a range query.

MainEntityCF {
         TimeUUIDKeyA: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : "Val3"]
         TimeUUIDKeyX: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : "Val3"]
         TimeUUIDKeyB: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : "Val3"]
         TimeUUIDKeyY: ["Col1" : "Val1", "Col2" : "Val2", "Col3" : "Val3"]
}
MainEntityCF_Index {
      "SomeSuperColumn": [TimeUUIDKeyA:null, TimeUUIDKeyB:null,
TimeUUIDKeyX:null, TimeUUIDKeyY:null]
}

-- 
Roshan
Blog: http://roshandawrani.wordpress.com/
Twitter: @roshandawrani <http://twitter.com/roshandawrani>
Skype: roshandawrani

Mime
View raw message