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 1C7A5DBE0 for ; Sat, 17 Nov 2012 16:44:14 +0000 (UTC) Received: (qmail 48301 invoked by uid 500); 17 Nov 2012 16:44:13 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 48252 invoked by uid 500); 17 Nov 2012 16:44:13 -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 48228 invoked by uid 99); 17 Nov 2012 16:44:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Nov 2012 16:44:13 +0000 Date: Sat, 17 Nov 2012 16:44:13 +0000 (UTC) From: "Lars Hofhansl (JIRA)" To: issues@hbase.apache.org Message-ID: <1062820018.127705.1353170653065.JavaMail.jiratomcat@arcas> In-Reply-To: <759564144.12369.1350939133387.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HBASE-7026) Make metrics collection in StoreScanner.java more efficient 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-7026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499458#comment-13499458 ] Lars Hofhansl commented on HBASE-7026: -------------------------------------- Looks like in trunk this is already gone?! I see stuff like this: {code} if (cumulativeMetric > 0 && metric != null) { } {code} An empty if statement, that does not look like it was on purpose. [~eclark] Is this by accident from the metric refactor? > Make metrics collection in StoreScanner.java more efficient > ----------------------------------------------------------- > > Key: HBASE-7026 > URL: https://issues.apache.org/jira/browse/HBASE-7026 > Project: HBase > Issue Type: Sub-task > Reporter: Karthik Ranganathan > Assignee: Karthik Ranganathan > > Per the benchmarks I ran, the following block of code seems to be inefficient: > StoreScanner.java: > public synchronized boolean next(List outResult, int limit, > String metric) throws IOException { > // ... > // update the counter > if (addedResultsSize > 0 && metric != null) { > HRegion.incrNumericMetric(this.metricNamePrefix + metric, > addedResultsSize); > } > // ... > Removing this block increased throughput by 10%. We should move this to the outer layer. -- 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