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 ECFE7D7D2 for ; Wed, 22 Aug 2012 13:49:47 +0000 (UTC) Received: (qmail 76124 invoked by uid 500); 22 Aug 2012 13:49:45 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 76040 invoked by uid 500); 22 Aug 2012 13:49:45 -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 75651 invoked by uid 99); 22 Aug 2012 13:49:44 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 13:49:44 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9E2F02C090D for ; Wed, 22 Aug 2012 13:49:44 +0000 (UTC) Date: Thu, 23 Aug 2012 00:49:44 +1100 (NCT) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: <1993470241.105.1345643384648.JavaMail.jiratomcat@arcas> In-Reply-To: <485325281.32712.1345506578037.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HBASE-6621) Reduce calls to Bytes.toInt 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-6621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439500#comment-13439500 ] Hudson commented on HBASE-6621: ------------------------------- Integrated in HBase-0.94-security #48 (See [https://builds.apache.org/job/HBase-0.94-security/48/]) HBASE-6621 Reduce calls to Bytes.toInt (Revision 1375665) Result = FAILURE larsh : Files : * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/KeyValue.java * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java > Reduce calls to Bytes.toInt > --------------------------- > > Key: HBASE-6621 > URL: https://issues.apache.org/jira/browse/HBASE-6621 > Project: HBase > Issue Type: Bug > Reporter: Lars Hofhansl > Assignee: Lars Hofhansl > Priority: Minor > Fix For: 0.96.0, 0.94.2 > > Attachments: 6621-0.96.txt, 6621-0.96-v2.txt, 6621-0.96-v3.txt, 6621-0.96-v4.txt > > > Bytes.toInt shows up quite often in a profiler run. > It turns out that one source is HFileReaderV2$ScannerV2.getKeyValue(). > Notice that we call the KeyValue(byte[], int) constructor, which forces the constructor to determine its size by reading some of the header information and calculate the size. In this case, however, we already know the size (from the call to readKeyValueLen), so we could just use that. > In the extreme case of 10000's of columns this noticeably reduces CPU. -- 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