Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D13CFDFE7 for ; Thu, 13 Dec 2012 05:37:26 +0000 (UTC) Received: (qmail 42699 invoked by uid 500); 13 Dec 2012 05:37:26 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 42658 invoked by uid 500); 13 Dec 2012 05:37:25 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 42629 invoked by uid 99); 13 Dec 2012 05:37:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 05:37:24 +0000 Date: Thu, 13 Dec 2012 05:37:24 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-6580) New HTable pool, based on HBase(byte[], HConnection, ExecutorService) constructor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-6580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13530698#comment-13530698 ] Lars Hofhansl commented on HBASE-6580: -------------------------------------- Hmm... {{HConnection.getTable(byte[], ExecutorService)}} is not that much better than {{new HTable(byte[], HConnection, ExecutorService)}}. Note that a single HTable can use many threads to parallelize update requests to multiple region servers. Let's do this? * optionally allow createConnection to be passed a ExecutorService, I think we can document that this service will be closed when the connection is closed. If none is passed create the executor as you do (but maybe with more core threads that do not time out?). * optionally allow getTable to override the ExecutorService. (For example: In our case we'll have an ExecutorService with something like 100 core threads, a wait queue of size 100, and max size of 200... For a total of 300 outstanding update requests across all HTable instances). > 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