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 E8757101E4 for ; Mon, 9 Sep 2013 21:34:52 +0000 (UTC) Received: (qmail 3918 invoked by uid 500); 9 Sep 2013 21:34:52 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 3878 invoked by uid 500); 9 Sep 2013 21:34:52 -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 3834 invoked by uid 99); 9 Sep 2013 21:34:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Sep 2013 21:34:52 +0000 Date: Mon, 9 Sep 2013 21:34:52 +0000 (UTC) From: "Jonathan Hsieh (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-9359) Convert KeyValue to Cell in hbase-client module - Result/Put/Delete, ColumnInterpreter 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-9359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762332#comment-13762332 ] Jonathan Hsieh commented on HBASE-9359: --------------------------------------- [~sershe] the 0.96 mechanism I saw most commonly used in the unit tests was the KV#getValue, KV#getRow, KV#getColumn, and KV#getFamily methods. These all allocate new buffers and make copies. In the 0.96 interface of Cell, I added these methods with the same semantics but marked as deprecated (since it is inefficient). In 0.96 I've also added CellUtil#getValueArray, CellUtil#getRowArray, CellUtil#getColumnArray, and CellUtil#getFAmilyArray which have the byte allocate and copying semantics. Applications concerned about performance (avoiding copies when references will do) over legibility would have to be "pointer aware" could read directly from the Cell#get*Array (careful, this actually acts more like a pointer than an array, and is assumed but not enforced to be immutable) using Cell#get*Offset as a index into the pointer and Cell#get*Length as a bounds check. > Convert KeyValue to Cell in hbase-client module - Result/Put/Delete, ColumnInterpreter > -------------------------------------------------------------------------------------- > > Key: HBASE-9359 > URL: https://issues.apache.org/jira/browse/HBASE-9359 > Project: HBase > Issue Type: Sub-task > Components: Client > Affects Versions: 0.95.2 > Reporter: Jonathan Hsieh > Assignee: Jonathan Hsieh > Fix For: 0.98.0, 0.96.0 > > Attachments: hbase-9334-9359.v4.patch, hbase-9359-9334.v5.patch, hbase-9359-9334.v6.patch, hbase-9359.patch, hbase-9359.v2.patch, hbase-9359.v3.patch, hbase-9359.v5.patch, hbase-9359.v6.patch > > > This path is the second half of eliminating KeyValue from the client interfaces. This percolated through quite a bit. -- 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