You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Chris Larsen <cl...@euphoriaaudio.com> on 2012/11/10 05:46:10 UTC

Retrieve Multiple CFs from Range Slice

Hi! Is there a way to retrieve the columns for all column families on a
given row while fetching range slices? My keyspace has two column families
and when I'm scanning over the rows, I'd like to be able to fetch the
columns in both CFs while iterating over the keys so as to avoid having to
run two scan operations. When I set the CF to an empty string, ala
ColumnParent.setColumn_family(""), it throws an error "non-empty
columnfamily is required". (Using the Thrift API directly from JAVA on Cass
1.1.6) My HBase scans can return both CFs per row so it works nicely.
Thanks!


Re: Retrieve Multiple CFs from Range Slice

Posted by Edward Capriolo <ed...@gmail.com>.
HBase is different is this regard. A table is comprised of multiple
column families, and they can be scanned at once. However, last time I
checked, scanning a table with two column families is still two
"seeks" across three different column families.

A similar thing can be accomplished in cassandra by issuing two range
scans, (possibly executing them asynchronously in two threads)

I am sure someone will correct me if I am mistaken.


On Fri, Nov 9, 2012 at 11:46 PM, Chris Larsen <cl...@euphoriaaudio.com> wrote:
> Hi! Is there a way to retrieve the columns for all column families on a
> given row while fetching range slices? My keyspace has two column families
> and when I’m scanning over the rows, I’d like to be able to fetch the
> columns in both CFs while iterating over the keys so as to avoid having to
> run two scan operations. When I set the CF to an empty string, ala
> ColumnParent.setColumn_family(""), it throws an error “non-empty
> columnfamily is required”. (Using the Thrift API directly from JAVA on Cass
> 1.1.6) My HBase scans can return both CFs per row so it works nicely.
> Thanks!