[ https://issues.apache.org/jira/browse/HBASE-8220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13618310#comment-13618310 ]
Jean-Marc Spaggiari commented on HBASE-8220: -------------------------------------------- Sound good to me. Few comments. - Remove the extra space at the end of this.concurrentUsingTableCounts = new ConcurrentHashMap<String, AtomicInteger>(); - Remove the extra space at the end of + if ((previousCount = concurrentUsingTableCounts.putIfAbsent(tableName, initCount)) == null) { - In returnTable, I'm not sure we should reduce the counter after releaseHTableInterface and not before. The table you are removing will already be removed from the "tables" field even if releaseHTableInterface fails. I think we should keep the 2 in sync and therefore make sure decrementAndGet is called before releaseHTableInterface. Might need to have a 2nd opinion on that. - concurrentUsingTableCounts field (and subsequent methods) might be renamed concurrentUsedTableCounts or something similar (concurrentTableCount, etc.) - Make sure the patch is build over the 0.94 branch and not a specific 0.94.x tag. Have you run the test suite locally? Does it pass? > can we record the count opened HTable for HTablePool > ---------------------------------------------------- > > Key: HBASE-8220 > URL: https://issues.apache.org/jira/browse/HBASE-8220 > Project: HBase > Issue Type: Improvement > Components: Client > Affects Versions: 0.94.3 > Reporter: cuijianwei > Attachments: HBASE-8220-0.94.3.txt, HBASE-8220-0.94.3.txt > > > In HTablePool, we have a method getCurrentPoolSize(...) to get how many > opened HTable has been pooled. However, we don't know ConcurrentOpenedHTable > which means the count of HTable get from HTablePool.getTable(...) and don't > return to HTablePool by PooledTable.close(). The ConcurrentOpenedHTable may > be meaningful because it indicates how many HTables should be opened for the > application which may help us set the appropriate MaxSize of HTablePool. > Therefore, we can and a ConcurrentOpenedHTable as a counter in HTablePool. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira