That is correct. Random partitioner orders rows according to the MD5 sum.

Am 25.05.2011 um 16:11 schrieb "Robert Jackson" 
<robe...@promedicalinc.com<mailto:robe...@promedicalinc.com>>:

Also, it is my understanding that if you are not using 
OrderPreservingPartitioner a get_range_slices may not return what you would 
expect.

With the RandomPartitioner you can iterate over the complete list by using the 
last row key as the start for subsequent requests, but if you are using a 
single query you will be returned all the rows where the returned row key's md5 
is between the md5 of the start row key and stop row key.

Reference:
http://wiki.apache.org/cassandra/FAQ - "Why aren't range slices/sequential 
scans giving me the expected results?"

Robert Jackson

________________________________
From: "Jonathan Ellis" <jbel...@gmail.com<mailto:jbel...@gmail.com>>
To: user@cassandra.apache.org<mailto:user@cassandra.apache.org>
Sent: Wednesday, May 25, 2011 8:54:34 AM
Subject: Re: "range query" vs "slice range query"

get_range_slices is the api to get a slice (of columns) from each of a
range (of rows)

On Wed, May 25, 2011 at 3:42 AM, david lee <iecan...@gmail.com> wrote:
> hi guys,
> i'm reading up on the book "Cassandra - Definitive guide"
> and i don't seem to understand what it says about "ranges and slices"
> my understanding is
> a range as in "a mathematical range to define a subset from an ordered set
> of elements",
> in cassandra typically means a range of rows whereas
> a slice means a range of columns.
> a range query refers to a query to retrieve a range of rows whereas
> a slice range queyr refers to a query to retrieve range of columns within a
> row.
> i may be talking about total nonsense but i really am more confused after
> reading this portion of the book
> http://books.google.com/books?id=MKGSbCbEdg0C&pg=PA134&lpg=PA134&dq=cassandra+%22range+query%22+%22range+slice%22&source=bl&ots=XoPB4uA60u&sig=uDDoQe0FRkQobHnr-vPvvQ3B8TQ&hl=en&ei=ub3cTcvGLZLevQOuxs3CDw&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCwQ6AEwAw#v=onepage&q=cassandra%20%22range%20query%22%20%22range%20slice%22&f=false
> many thanx in advance
> david
>



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

Reply via email to