Here is the relevant part of the previous thread:

Thank you. That is very good news. I can sort the results myself - what is
important is that I get them!

On Thu, May 13, 2010 at 2:42 AM, Vijay <vijay2...@gmail.com> wrote:
If you use Random partitioner, You will *NOT* get RowKey's sorted. (Columns
are sorted always).

Answer: If used Random partitioner
True True

Regards,
</VJ>

On Wed, May 12, 2010 at 1:25 AM, David Boxenhorn <da...@lookin2.com> wrote:
You do any kind of range slice, e.g. keys beginning with "abc"? But the
results will not be ordered?

Please answer one of the following:

True True
True False
False False

Explain?

Thanks!

On Sun, May 9, 2010 at 8:27 PM, Vijay <vijay2...@gmail.com> wrote:
True, The Range slice support was enabled in Random Partitioner for the
hadoop support.
Random partitioner actually hash the Key and those keys are sorted so we
cannot have the actual key in order.... (Hope this doesnt confuse you)...

Regards,
</VJ>


On Wed, Jun 2, 2010 at 3:40 PM, Ben Browning <ben...@gmail.com> wrote:

> The keys will not be in any specific order when not using OPP, so, you
> will never "get out of range" - you have to iterate over every single
> key to find all keys that start with "CATEGORY". If you don't iterate
> over every single key you run a chance of missing some. Obviously,
> this kind of key range scan is nothing something that will scale well
> as the number of keys go up. If your app needs this kind of behavior
> you'd be much better off with OPP.
>
> Ben
>
> On Wed, Jun 2, 2010 at 8:29 AM, David Boxenhorn <da...@lookin2.com> wrote:
> > In other words, I should check the values as I iterate, and stop
> iterating
> > when I get out of range?
> >
> > I'll try that!
> >
> > On Wed, Jun 2, 2010 at 3:15 PM, Dr. Martin Grabmüller
> > <martin.grabmuel...@eleven.de> wrote:
> >>
> >> When not using OOP, you should not use something like 'CATEGORY/' as the
> >> end key.
> >> Use the empty string as the end key and limit the number of returned
> keys,
> >> as you did with
> >> the 'max' value.
> >>
> >> If I understand correctly, the end key is used to generate an end token
> by
> >> hashing it, and
> >> there is not the same correspondence between 'CATEGORY' and 'CATEGORY/'
> as
> >> for
> >> hash('CATEGORY') and hash('CATEGORY/').
> >>
> >> At least, this was the explanation I gave myself when I had the same
> >> problem.
> >>
> >> The solution is to iterate through the keys by always using the last key
> >> returned as the
> >> start key for the next call to get_range_slices, and the to drop the
> first
> >> element from
> >> the result.
> >>
> >> HTH,
> >>   Martin
> >>
> >> ________________________________
> >> From: David Boxenhorn [mailto:da...@lookin2.com]
> >> Sent: Wednesday, June 02, 2010 2:01 PM
> >> To: user@cassandra.apache.org
> >> Subject: Re: Range search on keys not working?
> >>
> >> The previous thread where we discussed this is called, "key is sorted?"
> >>
> >>
> >> On Wed, Jun 2, 2010 at 2:56 PM, David Boxenhorn <da...@lookin2.com>
> wrote:
> >>>
> >>> I'm not using OPP. But I was assured on earlier threads (I asked
> several
> >>> times to be sure) that it would work as stated below: the results would
> not
> >>> be ordered, but they would be correct.
> >>>
> >>> On Wed, Jun 2, 2010 at 2:51 PM, Torsten Curdt <tcu...@vafer.org>
> wrote:
> >>>>
> >>>> Sounds like you are not using an order preserving partitioner?
> >>>>
> >>>> On Wed, Jun 2, 2010 at 13:48, David Boxenhorn <da...@lookin2.com>
> wrote:
> >>>> > Range search on keys is not working for me. I was assured in earlier
> >>>> > threads
> >>>> > that range search would work, but the results would not be ordered.
> >>>> >
> >>>> > I'm trying to get all the rows that start with "CATEGORY."
> >>>> >
> >>>> > I'm doing:
> >>>> >
> >>>> > String start = "CATEGORY.";
> >>>> > .
> >>>> > .
> >>>> > .
> >>>> > keyspace.getSuperRangeSlice(columnParent, slicePredicate, start,
> >>>> > "CATEGORY/", max)
> >>>> > .
> >>>> > .
> >>>> > .
> >>>> >
> >>>> > in a loop, setting start to the last key each time - but I'm getting
> >>>> > rows
> >>>> > that don't start with "CATEGORY."!!
> >>>> >
> >>>> > How do I get all rows that start with "CATEGORY."?
> >>>
> >>
> >
> >
>

Reply via email to