Hi Ran, I am not doing it the YAML way. I am defining my SCF through Hector API as below
================================================================ ThriftCfDef cfDef = HFactory.createColumnFamilyDefinition(ksName, "SCF") cfDef.setColumnMetadata(...) cfDef.setColumnType(ColumnType.SUPER) cfDef.setSubComparatorType(ComparatorType.TIMEUUIDTYPE) ================================================================ And this is the structure of the SCF: ================================================================ "key1" : "superCol1": SubColName1 (TimeUUID) : null SubColName2 (TimeUUID) : null SubColName3 (TimeUUID) : null "superCol2": SubColName4 (TimeUUID) : null SubColName5 (TimeUUID) : null SubColName6 (TimeUUID) : null ================================================================ I now try to retrieve the data as below, but for both reverse = true | false, it's only the order of supercolumns that changes. The subcolumns always come in the same order - oldest to newest ================================================================ RangeSuperSlicesQuery#setRange (null, null, reverse, Integer.MAX_VALUE) // reverse = true | false ================================================================ Anything I am doing wrong here? -- Roshan Blog: http://roshandawrani.wordpress.com/ Twitter: @roshandawrani <http://twitter.com/roshandawrani> Skype: roshandawrani On Sun, Dec 26, 2010 at 5:31 PM, Ran Tavory <ran...@gmail.com> wrote: > Roshan, in cassandra.yaml did you define compare_subcolumns_with for the > SCF? > The subcolumn names are the timeuuid, not the subcolumn values, right? > > > On Sun, Dec 26, 2010 at 9:14 AM, Roshan Dawrani > <roshandawr...@gmail.com>wrote: > >> Hi, >> >> I have a super ColumnFamily that has a few super columns, with each having >> a growing list of sub-columns where column name is a TimeUUID, so the >> sub-columns get stored chronologically (oldest to newest) >> >> When I retrieve this data, can I somehow retrieve the sub-columns in >> reverse order - newest first? >> >> I am using RangeSuperSlicesQuery to query the super columns and setting a >> range on it with *reverse = true*, but that only sorts the data by super >> column names. >> >> How can I tell RangeSuperSlicesQuery to get the sub-columns also in >> reverse order? >> >> Thanks. >> >> -- >> Roshan >> Blog: http://roshandawrani.wordpress.com/ >> Twitter: @roshandawrani <http://twitter.com/roshandawrani> >> Skype: roshandawrani >> > > > > -- > /Ran > >