I know they are always sorted but if they are how do you know which row key 
belong to which data? Currently I use a row key of ID|Date so I always know 
what the startrow and endrow should be. I know I'm missing something really 
fundamental here. :-(

Thanks

-Pete

-----Original Message-----
From: tsuna [mailto:[email protected]] 
Sent: Friday, January 28, 2011 12:14 PM
To: [email protected]
Subject: Re: Row Keys

On Fri, Jan 28, 2011 at 12:09 PM, Peter Haidinyak <[email protected]> wrote:
>        This is going to seem like a dumb question but it is recommended that 
> you use a random key to spread the insert/read load among your region 
> servers. My question is if I am using a scan with startrow and endrow  how 
> does that work with random row keys?

The keys are always sorted.  So if you generate random keys, you'll
get your data back in a random order.
What is recommended depends on the specific problem you're trying to
solve.  But generally, one of the strengths of HBase is that the rows
are sorted, so sequential scanning is efficient (thanks to data
locality).

-- 
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

Reply via email to