hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allan Yang <allan...@apache.org>
Subject Re: Regarding Connection Pooling
Date Mon, 12 Jun 2017 14:01:47 GMT
Connection is thread safe. You can use it across different threads. And
requests made by different thread are handled in parallel no matter the
keys are in the same region or not.

2017-06-12 20:44 GMT+08:00 Sachin Jain <sachinjain024@gmail.com>:

> Hi,
> I was going through connections in hbase. Here is reference from
> ConnectionFactory API doc.
> >  Connection encapsulates all housekeeping for a connection to the
> cluster. All tables and interfaces created from returned connection share
> zookeeper connection, meta cache, and connections to region servers and
> masters.
> Suppose I am building a REST api and trying to retrieve data from Hbase in
> REST calls. I am thinking to pre-create a connection and use it among
> different request threads.
> Suppose I get multiple requests for keys within same region, will that
> single connection be able to serve multiple requests via same region server
> ?
> Or Are those requests handled serially because once a request is made to
> region server for key1,
> another requests for key2,..,keyN have to wait for request of key1 to
> complete.
> Even if I create a connection pool of pre-created connections of N size,
> does that mean I can serve only N parallel requests if all those requests
> have to deal with same hbase region server. Is this true ?
> [0]:
> https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/
> ConnectionFactory.html
> Thanks
> -Sachin

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