hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Muraru (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6580) New HTable pool, based on HBase(byte[], HConnection, ExecutorService) constructor
Date Sun, 02 Dec 2012 00:23:58 GMT

    [ https://issues.apache.org/jira/browse/HBASE-6580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508113#comment-13508113

Adrian Muraru commented on HBASE-6580:

bq. Should allow passing an ExecutorService to HConnectionManager.createConnection(...). In
fact I would require that now, and have that as the only option to setup the ExecutorService.

Managing the shared ExecutorService internally would be more usable for the user in my opinion,
no need to create or shutdown  - I look at this executor as an internal detail used to execute
*some* table operations in parallel.

bq. getTable must fail if this is a "managed", i.e. not created by createConnection (check
the managed flag for that). Otherwise the HTable and the HConnection will get very confused.

Can you elaborate? Why is not advisable to use a "managed" connection when creating a HTable.
I can do today :
HTable t = new HTable(tableName, HConnectionManager.getConnection(conf), pool) 
and have an HTable using a "managed" connection 
> New HTable pool, based on HBase(byte[], HConnection, ExecutorService) constructor
> ---------------------------------------------------------------------------------
>                 Key: HBASE-6580
>                 URL: https://issues.apache.org/jira/browse/HBASE-6580
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.92.2, 0.94.2
>            Reporter: Lars Hofhansl
>            Priority: Minor
>         Attachments: HBASE-6580_v1.patch, HBASE-6580_v2.patch
> Here I propose a very simple TablePool.
> It could be called LightHTablePool (or something - if you have a better name).
> Internally it would maintain an HConnection and an Executor service and each invocation
of getTable(...) would create a new HTable and close() would just close it.
> In testing I find this more light weight than HTablePool and easier to monitor in terms
of resources used.
> It would hardly be more than a few dozen lines of code.

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

View raw message