incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caleb Rackliffe <ca...@steelhouse.com>
Subject Reading Last Values From a SuperColumn
Date Thu, 27 Oct 2011 03:55:19 GMT
Hi Everybody,

I have a column family of super-columns with long names.  The columns in each super-column
also have long names.  I'm using Hector, and what I want to do is get the last column in each
super-column, for a range of super-columns.  I was able to get the last column in a column
family  like this…


Cluster cluster = HFactory.getOrCreateCluster("Cortex", config);

Keyspace keyspace = HFactory.createKeyspace("Products", cluster);

RangeSlicesQuery<String, String, String> rangeSlicesQuery =

HFactory.createRangeSlicesQuery(keyspace, StringSerializer.get(), StringSerializer.get(),
StringSerializer.get());

rangeSlicesQuery.setColumnFamily("Attributes");

rangeSlicesQuery.setKeys("id0", "id0");

rangeSlicesQuery.setRange("", "", true, 1);


QueryResult<OrderedRows<String, String, String>> rsult = rangeSlicesQuery.execute();


…but no luck with the additional dimension.


Thanks in advance!

Caleb Rackliffe | Software Developer
M 949.981.0159 | caleb@steelhouse.com
[cid:63B04035-B5DF-48C6-9396-B72DBE859205]

Mime
View raw message