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 0E8B01099B for ; Fri, 14 Feb 2014 06:06:31 +0000 (UTC) Received: (qmail 83622 invoked by uid 500); 14 Feb 2014 06:06:26 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 83499 invoked by uid 500); 14 Feb 2014 06:06:25 -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 83345 invoked by uid 99); 14 Feb 2014 06:06:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 06:06:23 +0000 Date: Fri, 14 Feb 2014 06:06:23 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7320) Remove KeyValue.getBuffer() 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-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901141#comment-13901141 ] stack commented on HBASE-7320: ------------------------------ bq. So can we make Cell of type HeapSize and Cloneable? Cloneable makes sense. HeapSize is how we do our accounting now so makes sense to me that we'd implement it. But what to do when a Cell implementation is but a facade on data that is elsewhere, not 'owned' by the Cell? For instance, say the Cell is a facade on direct byte buffers. What will you return when I call heapSize? (I suppose it would be the overhead the Cell consumes on heap, not the sizes of data which is offheap?). What about when the Cell is a facade over an onheap block? Here again you could return the Cell overhead and hope the block is being accounted some other way. What if the Cell row, family, qualifier, type, and ts -- i.e. the 'key' -- are onheap and the data offheap? And so on. HeapSize is probably unavoidable. A bunch of basic mechanisms in hbase count on it returning a decent answer. IIRC, I suggested Cell implementing HeapSize in the past and [~mcorgan] asked why not have size accounting done by a CellUtil method... This would probably be awkward to call in lots of contexts but would that work? > Remove KeyValue.getBuffer() > --------------------------- > > Key: HBASE-7320 > URL: https://issues.apache.org/jira/browse/HBASE-7320 > Project: HBase > Issue Type: Bug > Reporter: Lars Hofhansl > Assignee: stack > Fix For: 0.99.0 > > Attachments: 7320-simple.txt > > > In many places this is simple task of just replacing the method name. > There, however, quite a few places where we assume that: > # the entire KV is backed by a single byte array > # the KVs key portion is backed by a single byte array > Some of those can easily be fixed, others will need their own jiras. -- This message was sent by Atlassian JIRA (v6.1.5#6160)