Hi guys,

In my case I am using 0.92.1 HTablePool, my code works like the following:

initializing one HTablePool using a shared HBaseConfiguration. so all my
connections will be sharing the same conf and HConnection.

so when the hbase query comes, the HTablePool.getTable(tablename) gets
called.

1. if pool is empty, it creates a PooledHTable for me

2. if pool is avaiable:

I get a PooledHtable instance, once I am done with query, I call
PooledHtable.close(), it will return PooledHtable instance to the pool
without closing any Hconnection in the shared Conf object.

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.

So only pooledHtable gets put back to the pool and PooledHtable.close()
will never try to close any Hconnection. But I am intermittently getting
the exception below:

! Caused by: java.io.IOException:
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@413d26d2closed

! at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:794)

! at
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.locateRegion(HConnectionManager.java:782)

! at org.apache.hadoop.hbase.client.HTable.finishSetup(HTable.java:249)

! at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:213)

! at
org.apache.hadoop.hbase.client.HTableFactory.createHTableInterface(HTableFactory.java:36)

I have no clue why I ended up having closed HConnectionImplementation
returned in the pool. But i wonder it can be caused by the way I use
HbasePool.

 In jira, there is a relative bug reported:
https://issues.apache.org/jira/browse/HBASE-6956

Any ideas?


-- 
All the best,
Shengjie Min

Reply via email to