cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Ribeiro <>
Subject range get over subcolumns on supercolumn family
Date Sun, 25 Apr 2010 22:04:04 GMT
Hi all!

 I am trying to do a paginated query on the subcolumns of a superfamily
column but sincerely I am a little bit confused.
 I have already been able to do a range query but only over the keys of a
regular column family.
 For the keys case I've been able to do so using the code below:

            KeyRange keyRange = new KeyRange(count);

            SliceRange range = new SliceRange();
            range.setStart(new byte[] {});
            range.setFinish(new byte[] {});

            SlicePredicate predicate = new SlicePredicate();

            ColumnParent cp = new ColumnParent("ColumnFamily");

            List<KeySlice> keySlices = client.get_range_slices("Keyspace",
cp, predicate, keyRange, ConsistencyLevel.ALL);

 Is there any way I can do a similar approach to do the range query on the
subcolumns? Would I need to do some trick over ColumnParent? I tried setting
the supercolumn attribute but with no success (sincerely I knew it wont work
but it was worth trying). Only to clarify a little bit... I am still
exercising what is possible to do with Cassandra and I was willing to store
a key over a supercolumnfamily with uuid keys under it so I could scan it
using an ordering scheme but without loading the whole data under the top
level key.

best regards,
Rafael Ribeiro

View raw message