hector-client / hector

a high level client for cassandra
http://prettyprint.me/2010/02/23/hector-a-java-cassandra-client/
MIT License
644 stars 299 forks source link

Return QueryResult in sorted collection #438

Open vladaman opened 12 years ago

vladaman commented 12 years ago

I have a suggestion:

I'd like to get all rows sorted by key even when using RandomPartitioner. I see there is RowsImpl and OrderedRowsImpl unfortunately createMultigetSliceQuery returns keys using LinkedHashMap() in random order.

It would be great if developer could provide parameter and comparator, which would put values in collection sorted by key. I think this would save many folks some resources going over data and sorting it again.

Thanks! Vlad

zznate commented 12 years ago

I'd be open to an overloaded form that took a comparator. I am dubious though of anything general purpose, since the keys could be of arbitrary type (including bytebuffer).

n0rad commented 12 years ago

+1 for this feature