You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Ted Yu <yu...@gmail.com> on 2011/01/26 19:19:40 UTC
releasing connections to zookeeper
In 0.90, I am looking for a programmatic way of releasing connections to
zookeeper.
When I run flow on 7-node cluster, there were 460 connections listed under
Clients of zk.jsp
Thanks
Re: releasing connections to zookeeper
Posted by Ted Yu <yu...@gmail.com>.
Stack:
I read that page.
Going over the source code helped me understand better as well.
Thanks
On Wed, Jan 26, 2011 at 2:31 PM, Stack <st...@duboce.net> wrote:
> Ted:
>
> I probably pointed you at this before,
>
> http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HConnectionManager.html
> ?
> Its how our Connection stuff works. Each new HConnection will open a
> new connection to zk ensemble. If clients share the Configuration
> instance, then they'll all use same zk ensemble client.
>
> Regards HBase, each RegionServer and each Master should be hosting one
> client of zk. Each of your HBase clients will have a zk client
> embedded. If HTablePool or multithreaded client and all HTable
> instances used in this clien all share the same Configuration, then
> this is still one zk client only.
>
> If you create a new Configuration instance for each new HTable
> instance, then you will be creating a new zk client.
>
> Any of the above zk clients embedded in hbase should be closed on exit.
>
> Does that help?
> St.Ack
>
> On Wed, Jan 26, 2011 at 10:44 AM, Ted Dunning <td...@maprtech.com>
> wrote:
> > There is a close method on the zk client data structure.
> >
> > Sounds like that isn't getting called
> >
> > On Wed, Jan 26, 2011 at 10:19 AM, Ted Yu <yu...@gmail.com> wrote:
> >
> >> In 0.90, I am looking for a programmatic way of releasing connections to
> >> zookeeper.
> >> When I run flow on 7-node cluster, there were 460 connections listed
> under
> >> Clients of zk.jsp
> >>
> >> Thanks
> >>
> >
>
Re: releasing connections to zookeeper
Posted by Stack <st...@duboce.net>.
Ted:
I probably pointed you at this before,
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HConnectionManager.html?
Its how our Connection stuff works. Each new HConnection will open a
new connection to zk ensemble. If clients share the Configuration
instance, then they'll all use same zk ensemble client.
Regards HBase, each RegionServer and each Master should be hosting one
client of zk. Each of your HBase clients will have a zk client
embedded. If HTablePool or multithreaded client and all HTable
instances used in this clien all share the same Configuration, then
this is still one zk client only.
If you create a new Configuration instance for each new HTable
instance, then you will be creating a new zk client.
Any of the above zk clients embedded in hbase should be closed on exit.
Does that help?
St.Ack
On Wed, Jan 26, 2011 at 10:44 AM, Ted Dunning <td...@maprtech.com> wrote:
> There is a close method on the zk client data structure.
>
> Sounds like that isn't getting called
>
> On Wed, Jan 26, 2011 at 10:19 AM, Ted Yu <yu...@gmail.com> wrote:
>
>> In 0.90, I am looking for a programmatic way of releasing connections to
>> zookeeper.
>> When I run flow on 7-node cluster, there were 460 connections listed under
>> Clients of zk.jsp
>>
>> Thanks
>>
>
Re: releasing connections to zookeeper
Posted by Ted Dunning <td...@maprtech.com>.
There is a close method on the zk client data structure.
Sounds like that isn't getting called
On Wed, Jan 26, 2011 at 10:19 AM, Ted Yu <yu...@gmail.com> wrote:
> In 0.90, I am looking for a programmatic way of releasing connections to
> zookeeper.
> When I run flow on 7-node cluster, there were 460 connections listed under
> Clients of zk.jsp
>
> Thanks
>