setReversed(true) sorts timeUUID in descending order.  thanks, -aj

On Sun, May 9, 2010 at 6:44 AM, Lee Parker <> wrote:
You need to set the Reversed attribute on the sliceRange.  I don't know which library you are using, but it may be something like sliceRange.setReversed(true).

Lee Parker

On Sat, May 8, 2010 at 7:36 PM, AJ Chen <> wrote:
I have a column family for sorting time-uuid and expect to retrieve columns in descending order (i.e. latest on the top). but the following get_slice call returns column in ascending order.  Does cassandra sort time-uuid column in descending order by default? Should get_slice call return the most recent time-uuid?

    <ColumnFamily CompareWith="TimeUUIDType" Name="Index"/>

    ColumnParent columnParent = new ColumnParent(cf);
    SlicePredicate predicate = new SlicePredicate();
    SliceRange sliceRange = new SliceRange();
    sliceRange.setStart(new byte[] {});
    sliceRange.setFinish(new byte[] {});
    return client.get_slice(keyspace, key, columnParent, predicate, ConsistencyLevel.ONE);


AJ Chen, PhD
Chair, Semantic Web SIG,
twitter @web2express
Palo Alto, CA, USA