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 A0877187B8 for ; Tue, 24 Nov 2015 07:13:12 +0000 (UTC) Received: (qmail 92843 invoked by uid 500); 24 Nov 2015 07:13:11 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 92780 invoked by uid 500); 24 Nov 2015 07:13:11 -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 92395 invoked by uid 99); 24 Nov 2015 07:13:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2015 07:13:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 585F32C1F6D for ; Tue, 24 Nov 2015 07:13:11 +0000 (UTC) Date: Tue, 24 Nov 2015 07:13:11 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-14826) Small improvement in KVHeap seek() API 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-14826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15023901#comment-15023901 ] Hudson commented on HBASE-14826: -------------------------------- FAILURE: Integrated in HBase-Trunk_matrix #494 (See [https://builds.apache.org/job/HBase-Trunk_matrix/494/]) HBASE-14826 Small improvement in KVHeap seek() API (Ram) (ramkrishna: rev afc5439be59c1ee74df8a6965cc2c4aad408ee3f) * hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/KeyValueHeap.java > Small improvement in KVHeap seek() API > -------------------------------------- > > Key: HBASE-14826 > URL: https://issues.apache.org/jira/browse/HBASE-14826 > Project: HBase > Issue Type: Improvement > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Priority: Minor > Attachments: HBASE-14826.patch, HBASE-14826_1.patch > > > Currently in seek/reseek() APIs we tend to do lot of priorityqueue related operations. We initially add the current scanner to the heap, then poll and again add the scanner back if the seekKey is greater than the topkey in that scanner. Since the KVs are always going to be in increasing order and in ideal scan flow every seek/reseek is followed by a next() call it should be ok if we start with checking the current scanner and then do a poll to get the next scanner. Just avoid the initial PQ.add(current) call. This could save some comparisons. -- This message was sent by Atlassian JIRA (v6.3.4#6332)