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 138C9109CB for ; Sat, 27 Jul 2013 06:49:57 +0000 (UTC) Received: (qmail 13859 invoked by uid 500); 27 Jul 2013 06:49:56 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 13720 invoked by uid 500); 27 Jul 2013 06:49:54 -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 13677 invoked by uid 99); 27 Jul 2013 06:49:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jul 2013 06:49:52 +0000 Date: Sat, 27 Jul 2013 06:49:52 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-8698) potential thread creation in MetaScanner.metaScan 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-8698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13721551#comment-13721551 ] Lars Hofhansl commented on HBASE-8698: -------------------------------------- 0.94 test run: {quote} Results : Failed tests: testDeleteEditUnknownColumnFamilyAndOrTable(org.apache.hadoop.hbase.client.TestAdmin) Tests run: 1359, Failures: 1, Errors: 0, Skipped: 13 {quote} Ran TestAdmin a few times in a loop: {quote} Running org.apache.hadoop.hbase.client.TestAdmin Tests run: 42, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 311.167 sec Results : Tests run: 42, Failures: 0, Errors: 0, Skipped: 0 {quote} Going to commit this tomorrow. > potential thread creation in MetaScanner.metaScan > ------------------------------------------------- > > Key: HBASE-8698 > URL: https://issues.apache.org/jira/browse/HBASE-8698 > Project: HBase > Issue Type: Bug > Components: Client > Affects Versions: 0.94.7 > Reporter: Kireet Reddy > Assignee: Lars Hofhansl > Fix For: 0.98.0, 0.95.2, 0.94.11 > > Attachments: 8698-0.94.txt, 8698-0.94-v2.txt, 8698-trunk.txt, 8698-trunk-v2.txt, 8698-trunk-v3.txt > > > MetaScanner.metaScan() creates an instance of HTable per call. The constructur used creates a new ThreadPoolExecutor. The executor itself will not create a thread unless it's pool is used. I am not sure if the HTable instance in question ever uses it's pool. But if so, this could become a big performance issue. Logging an issue at Lars's request. mail list chain below. > ------------------------------------- > Indeed. That is bad. > I cannot see a clean fix immediately, but we need to look at this. > Mind filing a ticket, Kireet? > -- Lars > ________________________________ > From: Kireet > To: public-user-50Pas4EWwPEyzMRdD/IqWQ-wOFGN7rlS/M9smdsby/KFg@public.gmane.org > Sent: Friday, May 31, 2013 11:58 AM > Subject: Re: HConnectionManager$HConnectionImplementation.locateRegionInMeta > > Even if I initiate the call via a pooled htable, the MetaScanner seems > to use a concrete HTable instance. The constructor invoked seems to > create a java ThreadPoolExecutor. I am not 100% sure but I think as long > as nothing is submitted to the ThreadPoolExecutor it won't create any > threads. I just wanted to confirm this was the case. I do see the > connection is shared. > --Kireet > On 5/30/13 7:38 PM, Ted Yu wrote: > > HTablePool$**PooledHTable is a wrapper around HTable. > > > > Here is how HTable obtains a connection: > > > > public HTable(Configuration conf, final byte[] tableName, final > > ExecutorService pool) > > throws IOException { > > this.connection = HConnectionManager.getConnection(conf); > > > > Meaning the connection is a shared one based on certain key/value pairs > > from conf. > > > > bq. So every call to batch will create a new thread? > > > > I don't think so. > > > > On Thu, May 30, 2013 at 11:28 AM, Kireet wrote: > > > >> > >> > >> Thanks, will give it a shot. So I should download 0.94.7 (latest stable) > >> and run the patch tool on top with the backport? This is a little new to me. > >> > >> Also, I was looking at the stack below. From my reading of the code, the > >> HTable.batch() call will always cause the prefetch call to occur, which > >> will cause a new HTable object to get created. The constructor used in > >> creating a new thread pool. So every call to batch will create a new > >> thread? Or the HTable's thread pool never gets used as the pool is only > >> used for writes? I think I am missing something but just want to confirm. > >> > >> Thanks > >> Kireet -- 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