Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 87152 invoked from network); 14 Aug 2009 00:19:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Aug 2009 00:19:32 -0000 Received: (qmail 99303 invoked by uid 500); 14 Aug 2009 00:19:39 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 99256 invoked by uid 500); 14 Aug 2009 00:19:39 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 99245 invoked by uid 99); 14 Aug 2009 00:19:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 00:19:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 00:19:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CF28629A0012 for ; Thu, 13 Aug 2009 17:19:14 -0700 (PDT) Message-ID: <1141043451.1250209154847.JavaMail.jira@brutus> Date: Thu, 13 Aug 2009 17:19:14 -0700 (PDT) From: "Jonathan Gray (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Updated: (HBASE-1765) Delay Result deserialization until asked for and permit access to the raw binary to prevent forced deserialization In-Reply-To: <1803428402.1250202554968.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-1765?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Gray updated HBASE-1765: --------------------------------- Attachment: HBASE-1765-v2.patch Adds new test TestSerialization.testResultDynamicBuild() which uncovers bug in first patch. New patch passes this test and passes all client tests that I've run. > Delay Result deserialization until asked for and permit access to the raw binary to prevent forced deserialization > ------------------------------------------------------------------------------------------------------------------ > > Key: HBASE-1765 > URL: https://issues.apache.org/jira/browse/HBASE-1765 > Project: Hadoop HBase > Issue Type: Improvement > Components: client > Affects Versions: 0.20.0 > Reporter: Jonathan Gray > Assignee: Jonathan Gray > Fix For: 0.20.1, 0.21.0 > > Attachments: HBASE-1765-v1.patch, HBASE-1765-v2.patch > > > We have our own API that we use to access HBase from other languages like erlang, python, c, etc... > The Java gateway that maps from the actual HBase API to our internal API wants to pass the raw binary received for a Result. As is, we have to deserialize into an array of KeyValues and then re-serialize into a flat byte[]. > We would like to propose modifying Result to not build the KeyValue[] until it's asked for via client methods (.raw() or .sorted() or any of the map methods). This is already how the map methods work (we don't build the map until it's asked for the first time). > The only API change would be adding an additional Result.getBytes() method the get the raw underlying byte[] that was sent from the server. > The Result.readFields(DataInput) would then only read in the full byte[]. Would add an additional private method Result.readFields() that generated the KeyValue[]. That would be called whenever a client asks for anything besides .getBytes(). > Since all access to Result is done through those methods (KeyValue[] private and not directly accessible w/o using those methods) this should not impact any existing code. > Thoughts? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.