Search code examples
cassandrahector

How to get different columns for multiple rows in one query from Cassandra?


Is it possible to get values for col "a" with key "1" and col "b" for key "2" and cols "c" and "d" for key "3" etc' from Cassandra in one query?

If yes, does hector support it?

(All these columns are in one column family and of the same type.)


Solution

  • It's not supported by method mutliget_slice() in cassandra thrift API (http://wiki.apache.org/cassandra/API), and Hector works on top of this method.

    Convenience method might be implemented in the client library with several calls to get_slice, but several network queries would be required anyway.