hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Meil <doug.m...@explorysmedical.com>
Subject Re: how get() works
Date Tue, 14 Feb 2012 16:06:05 GMT

Keys are stored in sorted order, it's basically a binary search.




On 2/14/12 9:31 AM, "Vamshi Krishna" <vamshi2105@gmail.com> wrote:

>Thank you Doug..
>
>Onemore question is, If a particular region is found by looking at the
>range handeled by it, How  is search performed within that region to find
>requested rowKey? Is it by linear search or binary search or any other
>algorithm? Or for every row in that region, is there any hash value stored
>and hash lookup takes place to get that rowKey's value?   what happens
>really within that region?
>
>On Mon, Feb 13, 2012 at 7:35 PM, Doug Meil
><doug.meil@explorysmedical.com>wrote:
>
>>
>> re:  "Now if that RegionServer has multiple
>> regions on it, how does the request get transfered to a correct region
>> which has the requested rowKey?"
>>
>> See...
>>
>> 
>>http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.htm
>>l#
>> getRegionLocation%28byte[],%20boolean%29
>>
>> As described in Arch/Client in the book, the Hbase client knows all the
>> regions and the the region boundaries from META.
>>
>>
>>
>>
>> On 2/13/12 1:46 AM, "Vamshi Krishna" <vamshi2105@gmail.com> wrote:
>>
>> >Hi all, i have a small basic doubt regarding get() method which is
>>used in
>> >HTable. From the hbase book, under 8.3.Client section, i understood
>>that,
>> >when ever client sends a request like get(rowKey) on any htable
>>instance,
>> >from ROOT and META, it knows the regionserver where the regions holding
>> >that requested rowKey is present. Now if that RegionServer has multiple
>> >regions on it, how does the request get transfered to a correct region
>> >which has the requested rowKey? (will there be again any lookups for
>>it?)
>> >
>> >Is it like this:  The RegionServer holds the information about all the
>> >regions it is hosting, so looking at the respective ranges of rows in
>>each
>> >region a region is selected, and passing that request to that
>>appropriate
>> >region.  Am i correct? if not, correct me.
>> >
>> >Onemore question is, If a particular region is found by looking at the
>> >range handeled by it, How  is search performed within that region to
>>find
>> >requested rowKey? Is it by linear search or binary search or any other
>> >algorithm? Or for every row in that region, is there any hash value
>>stored
>> >and hash lookup takes place to get that rowKey's value?   what happens
>> >really within that region?
>> >
>> >
>> >can anybody help, please..
>> >--
>> >*Regards*
>> >*
>> >Vamshi Krishna
>> >*
>>
>>
>>
>
>
>-- 
>*Regards*
>*
>Vamshi Krishna
>*



Mime
View raw message