3. if pool is out:
I get a normal Htable instance, because HTablePool.getTable will call
findOrCreateTable(), once there is not table available, it creates a
HbaseTable instance instead of PooledHbase instance in this case, once I am
done with query, I call Htable.close(), it will just release Htable
instance and close the associated connections. which makes good sense.
You always get a PooledHTable from the pool. But when you close it, if the pool is already full the HTable is not returned but closed instead. HTable close will call HConnection close() which really close itself only if it detects that it is no longer in use by clients. So apparently there is no problem with the implementation. Try to use a value high enough for the pool size to avoid the creation/closing of extra HTables which is bad for performance anyway.


Reply via email to