You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Andrew Whang <an...@gmail.com> on 2012/07/19 02:45:49 UTC

HTableFactory

I'm reading into the implementation of HTablePool, and notice that the two
argument constructor creates the default implementation of the
HTableInterfaceFactory, called HTableFactory. When I look at the
implementation of HTableFactory, the releaseHTableInterface() method
invokes HTableInterface.close(), which, in the context of HTablePool,
invokes HTablePool.returnTable(), which invokes
HTableFactory.releaseHTableInterface(), which invokes
HTablePool.returnTable(), and so on and so on.

Am I missing something here? It seems the releaseHTableInterface method
should not invoke HTableInterface.close.

Andrew

Re: HTableFactory

Posted by Andrew Whang <an...@gmail.com>.
Spoke too soon. Totally glanced past the if statement that checks for pool
maxSize. Thanks, J-D, for pointing it out. Sorry for the false alarm.

Andrew


On Wed, Jul 18, 2012 at 5:45 PM, Andrew Whang <an...@gmail.com>wrote:

> I'm reading into the implementation of HTablePool, and notice that the two
> argument constructor creates the default implementation of the
> HTableInterfaceFactory, called HTableFactory. When I look at the
> implementation of HTableFactory, the releaseHTableInterface() method
> invokes HTableInterface.close(), which, in the context of HTablePool,
> invokes HTablePool.returnTable(), which invokes
> HTableFactory.releaseHTableInterface(), which invokes
> HTablePool.returnTable(), and so on and so on.
>
> Am I missing something here? It seems the releaseHTableInterface method
> should not invoke HTableInterface.close.
>
> Andrew
>

Re: HTableFactory

Posted by Jean-Daniel Cryans <jd...@apache.org>.
In 0.94 HTablePool will only release the table when it has too many of
them, else it is just put back into the pool.

Is that not correct? What are you expecting instead?

Thx,

J-D

On Wed, Jul 18, 2012 at 5:45 PM, Andrew Whang <an...@gmail.com> wrote:
> I'm reading into the implementation of HTablePool, and notice that the two
> argument constructor creates the default implementation of the
> HTableInterfaceFactory, called HTableFactory. When I look at the
> implementation of HTableFactory, the releaseHTableInterface() method
> invokes HTableInterface.close(), which, in the context of HTablePool,
> invokes HTablePool.returnTable(), which invokes
> HTableFactory.releaseHTableInterface(), which invokes
> HTablePool.returnTable(), and so on and so on.
>
> Am I missing something here? It seems the releaseHTableInterface method
> should not invoke HTableInterface.close.
>
> Andrew