You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Jeff Zhang <zj...@gmail.com> on 2009/12/28 03:19:04 UTC
Question about the hbase source code
Hi all,
I am interested to know the internal implementation of hbase, so I'd like to
deep into the source source.
I found that the variable onlineRegions in HRegionServer is a map type and
the key is the hashcode of region name. So wont't it cause conflict ? I mean
tow region name may have the same hashcode. Or does the hash code
implemetation guarantee that two region name won't have the same hashcode ?
Thank you
Jeff Zhnag
Re: Question about the hbase source code
Posted by Ryan Rawson <ry...@gmail.com>.
We dont use the standard hashing function, but one that exhibits
fairly good properties of uniform output. This reduces the chance of a
conflict, so while not impossible, it is unlikely.
On Sun, Dec 27, 2009 at 6:19 PM, Jeff Zhang <zj...@gmail.com> wrote:
> Hi all,
>
> I am interested to know the internal implementation of hbase, so I'd like to
> deep into the source source.
> I found that the variable onlineRegions in HRegionServer is a map type and
> the key is the hashcode of region name. So wont't it cause conflict ? I mean
> tow region name may have the same hashcode. Or does the hash code
> implemetation guarantee that two region name won't have the same hashcode ?
>
> Thank you
>
> Jeff Zhnag
>