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 16D919901 for ; Fri, 15 Jun 2012 20:32:45 +0000 (UTC) Received: (qmail 25840 invoked by uid 500); 15 Jun 2012 20:32:43 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 25766 invoked by uid 500); 15 Jun 2012 20:32:43 -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 25553 invoked by uid 99); 15 Jun 2012 20:32:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2012 20:32:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 175DC142864 for ; Fri, 15 Jun 2012 20:32:43 +0000 (UTC) Date: Fri, 15 Jun 2012 20:32:43 +0000 (UTC) From: "M. Chen (JIRA)" To: issues@hbase.apache.org Message-ID: <1037695955.20030.1339792363097.JavaMail.jiratomcat@issues-vm> In-Reply-To: <777358716.19330.1339781322559.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HBASE-6217) reduce overhead of maintaing get/next size metric 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-6217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295908#comment-13295908 ] M. Chen commented on HBASE-6217: -------------------------------- Diff uploaded at https://reviews.facebook.net/differential/diff/11895 > reduce overhead of maintaing get/next size metric > ------------------------------------------------- > > Key: HBASE-6217 > URL: https://issues.apache.org/jira/browse/HBASE-6217 > Project: HBase > Issue Type: Improvement > Reporter: Kannan Muthukkaruppan > Assignee: M. Chen > Attachments: StoreScanner.java > > > [Forked off this specific issue as a separate JIRA from HBASE-6066]. > Reduce overhead of "size metric" maintained in StoreScanner.next(). > {code} > if (metric != null) { > HRegion.incrNumericMetric(this.metricNamePrefix + metric, > copyKv.getLength()); > } > results.add(copyKv); > {code} > A single call to next() might fetch a lot of KVs. We can first add up the size of those KVs in a local variable and then in a finally clause increment the metric one shot, rather than updating AtomicLongs for each KV. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira