hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Bauer <christoph.ba...@unbelievable-machine.com>
Subject Re: Manager Zookeeper Client Connections
Date Fri, 11 May 2012 14:07:13 GMT

that depends how you open it in tomcat.

if you open the connection to zookeeper inside a Servlet you can
implement the destroy() method to clean up your resources.
     * Cleans up resource connection
    public void destroy() {
        try {
            resource .close();
        } catch (Exception e) {
	} finally {
	    resource = null;

if you do it elsewhere: Search the documentation for destroy or
tearDown methods and implement them accordingly.

This question is better asked in the servlet community.


2012/5/11 Narendra yadala <narendra.yadala@gmail.com>:
> I have a client which connects to Zookeeper (which runs as part of HBase
> installation) from my web application running on top of Tomcat Servlet
> Container. Now whenever I restart my Tomcat the zookeeper client
> connections are left open or something which in turn causes the Max
> connections error from Zookeeper. What would be the best way to manage
> (close) the zookeeper connections gracefully.
> Thanks
> NY

View raw message