hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Hvitved" <chvit...@gmail.com>
Subject fetching multiple rows in one rpc invocation
Date Sat, 16 Aug 2008 14:54:44 GMT
Hi

I've started to play with hbase after reading the google big table paper and
finding the bigtable/hbase approach very interesting.

I am playing around with a little scenario:
I've have created a table containing persons. The keys I use in this table
are the persons civil registration number.

But I want to be able to search for persons using for example name and
surname. So I am creating another table holding indexes. For example if i
Want to find persons by their firstname. I use first name as the key in the
index table. A row then contains all the keys of the persons having the
giving name.

So when searcing for persons using firstame, I first search the index table
and finds the keys of all the persons with the given first name.

My problem is having a set of keys into one table, how do I fetch these rows
eficiently, with a good response time? I dont want to make a remote call
fetching each row using the HTable client api to get a row or by using a
scanner.

I am new to Hbase. Am I taken a wrong approach? Does the api allow for
fetching multiple rows in one call?

I was thinking of a method that given an array of keys could fetch the rows
efficiently. For example by finding out which regions and regionservers the
keys are located at using the metadata. Then concurrently a thread could be
started for each regionserver containing the keys, and the regionserver
could find all the rows in one method call.
I can se this approach could have some problems with big results that could
cause problems by consuming a lot of memory and cpu at each regionsinerver.
But maybe then a onfigured set of rows could be returned in one call (very
much ike a sql resultset).
Maybe I am taking a wrong approach, the hbase way of doing things are still
very new to me.

please help me out, It is so interesting looking into hbase

regards
Christian

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message