Re: Column Family row keys

2011-10-18 Thread Tyler Hobbs
On Tue, Oct 18, 2011 at 4:30 PM, Jonathan Ellis  wrote:

> On Tue, Oct 18, 2011 at 4:10 PM, Tyler Hobbs  wrote:
> >   * You'll get range ghosts
> > (http://wiki.apache.org/cassandra/FAQ#range_ghosts) with column_count=0.
> > You can avoid them if you set column_count=1.
>
> What heuristic do you use for skipping empty rows?
>

In get_range(), if key_slice.columns is empty and column_count != 0, skip
the row.  It also has the effect (both good and bad) of skipping rows when
column_count > 0 and there's a normal column slice, but the slice is empty.


Re: Column Family row keys

2011-10-18 Thread Jonathan Ellis
On Tue, Oct 18, 2011 at 4:10 PM, Tyler Hobbs  wrote:
>   * You'll get range ghosts
> (http://wiki.apache.org/cassandra/FAQ#range_ghosts) with column_count=0.
> You can avoid them if you set column_count=1.

What heuristic do you use for skipping empty rows?

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com


Re: Column Family row keys

2011-10-18 Thread Tyler Hobbs
A couple of notes:
  * You need to use the master branch (not the most recent release) if you
want to use get_range() with column_count=0 and get any results.
  * You'll get range ghosts (
http://wiki.apache.org/cassandra/FAQ#range_ghosts) with column_count=0.  You
can avoid them if you set column_count=1.

- Tyler

On Tue, Oct 18, 2011 at 3:58 PM, aaron morton wrote:

> There no first class support for just getting row keys, you will always
> want to get a column.
>
> You can fake it by requesting zero columns.
>
> Cheers
>
> -
> Aaron Morton
> Freelance Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 19/10/2011, at 3:53 AM, David Fischer(Gtalk) wrote:
>
> Hello all.
> New to cassandra and I am using pycassa to access data.  I was
> wondering someone knows how to just pull row keys insead of get_range?
> This question may be a bit more on the pycassa but not sure.  If
> someone has a java snippet to do it that would be ok also
>
> Thanks
>
>
>


Re: Column Family row keys

2011-10-18 Thread aaron morton
There no first class support for just getting row keys, you will always want to 
get a column. 

You can fake it by requesting zero columns.

Cheers

-
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 19/10/2011, at 3:53 AM, David Fischer(Gtalk) wrote:

> Hello all.
> New to cassandra and I am using pycassa to access data.  I was
> wondering someone knows how to just pull row keys insead of get_range?
> This question may be a bit more on the pycassa but not sure.  If
> someone has a java snippet to do it that would be ok also
> 
> Thanks



Column Family row keys

2011-10-18 Thread David Fischer(Gtalk)
Hello all.
New to cassandra and I am using pycassa to access data.  I was
wondering someone knows how to just pull row keys insead of get_range?
 This question may be a bit more on the pycassa but not sure.  If
someone has a java snippet to do it that would be ok also

Thanks