hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bijieshan <bijies...@huawei.com>
Subject Re: What the optimization method of when to delete Zk connection?
Date Wed, 08 Jun 2011 08:44:17 GMT
Thanks Suraj.
Yes, It's a better method. For I haven't test on that.
So use HTablePool, it seems we haven't need to delete Zk connections manually? Is that correct?


Jieshan Bean


How about using HTablePool - doesn't that work for you?


On Tue, Jun 7, 2011 at 2:23 AM, bijieshan <bijieshan@huawei.com> wrote:
> Hi,
> As we know , the zk connection could be created by the following method:
> Configuration newConfig = new Configuration(originalConf);
> HConnection connection = HConnectionManager.getConnection(newConfig);
> One HConnection instance proxy to one Configuration instance. Under some scenarios, we
can share Configuration instance, and also we can share the HConnection instance.
> Consider the following scenario:
> While the program running, there's so many scan operations. Each operation will be executed
at a random time. There's two schemes:
> (Suppose the program shared one Configuation instance.)
> 1. Create one HTable at a time, after the scanning, delete the connection and close the
> 2. Create one HTable at a time, after the scanning ,only close the HTable. So remain
the zk connection.
> (Maybe I can share the HTable instance, but it wasn't what I want to discuss here)
> Which is the best way? Or what the optimization method of when to delete Zk connection?
> Thanks!
> Jieshan Bean

View raw message