hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angus He <angu...@gmail.com>
Subject HBase 0.20.0rc not close the connection to zookeeper explicitly when closing HTable (and HBaseAdmin)
Date Tue, 04 Aug 2009 06:00:50 GMT
Hi All,

In HBase 0.20rc, HTable does not explicitly close the connection to
zookeeper in HTable::close.
It probably could be better.  And in my opinion, it should be for:

1. It is not well-behaved, although zookeeper is able to detect the
lost connection after issuing networking I/O operation, .
2. It is easy to get zookeeper server stuck with exceptions like "Too
many connections from /0:0:0:0:0     :0:0:1 - max is 30", when user
write codes like:
			for (int i = 0; i < 1024; ++i) {
				HTable table = new HTable("foobar");
				table.close();
			}

In the current implementation, different HTable instances share the
same connection to zookeeper if they have same HBaseConfiguration
instance. For this, we cannot close the connection directly in HTable,
but probably we could implement HConnection class with
reference-counting ability.

Any comments?

-- 
Regards
Angus

Mime
View raw message