hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Key formats and very low cardinality leading fields
Date Mon, 03 Sep 2012 18:31:55 GMT
Hi Eric,

In HBase, data is stored sequentially based on the key alphabetical order.

It will depend of the number of reqions and regionservers you have but
if you write data from 23AAAAAA to 23ZZZZZZ they will most probably go
to the same region even if the cardinality of the 2nd part of the key
is high.

If the first number is always changing between 1 and 30 for each
write, then you will reach multiple region/servers if you have, else,
you might have some hot-stopping.


2012/9/3, Eric Czech <eric@nextbigsound.com>:
> Hi everyone,
> I was curious whether or not I should expect any write hot spots if I
> structured my composite keys in a way such that the first field is a
> low cardinality (maybe 30 distinct values) value and the next field
> contains a very high cardinality value that would not be written
> sequentially.
> More concisely, I want to do this:
> Given one number between 1 and 30, write many millions of rows with
> keys like <number chosen> : <some generally distinct, non-sequential
> value>
> Would there be any problem with the millions of writes happening with
> the same first field key prefix even if the second field is largely
> unique?
> Thank you!

View raw message