Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 34EB4200B14 for ; Fri, 3 Jun 2016 08:47:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3397F160A25; Fri, 3 Jun 2016 06:47:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7C512160A2A for ; Fri, 3 Jun 2016 08:47:00 +0200 (CEST) Received: (qmail 64939 invoked by uid 500); 3 Jun 2016 06:46:59 -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 64423 invoked by uid 99); 3 Jun 2016 06:46:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2016 06:46:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3D99A2C1F6B for ; Fri, 3 Jun 2016 06:46:59 +0000 (UTC) Date: Fri, 3 Jun 2016 06:46:59 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-15879) Introduce Key interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 03 Jun 2016 06:47:01 -0000 [ https://issues.apache.org/jira/browse/HBASE-15879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ramkrishna.s.vasudevan updated HBASE-15879: ------------------------------------------- Attachment: HBASE-15879_1.patch Renames ContiguousKey to Key. Discussing with Anoop here, its better that this standalone Key be used with the cell impls alone where we think Key is contiguous. Not every cell should be implementing this Key. This is just for performance optimization and reduce garbage in cases of Bloom. [~saint.ack@gmail.com] To your point that Key can be created by asking a cell and what ever type it may be is true but that the idea of this interface is for optimzation and if we allow every cell to be Key then it is good enough adding the new getKey() APIs in cell itself. But one downside in having only certain cells impl the new Key interface is that we need to check if the Cell is of type Key and then see if the Cell is backed by array or BB and then call the suitable API in the Key interface. If not add isArray API in the Key interface. > Introduce Key interface > ----------------------- > > Key: HBASE-15879 > URL: https://issues.apache.org/jira/browse/HBASE-15879 > Project: HBase > Issue Type: Improvement > Reporter: ramkrishna.s.vasudevan > Assignee: ramkrishna.s.vasudevan > Attachments: HBASE-15879.patch, HBASE-15879_1.patch > > > Introduce an interface called Key and allow Cell implementations to implement this Key interface for cases like KeyValue, OffheapKeyValue and DBE cells (Except prefix tree) so that we can avoid copies when we deal with only Cells in case of block index creations (like ROOT, Bloom etc). Helps in reduction of garbage also. -- This message was sent by Atlassian JIRA (v6.3.4#6332)