cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AJ Chen <>
Subject [cassandra] sorting TimeUUID column?
Date Sun, 09 May 2010 00:36:04 GMT
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,


View raw message