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 E6B3F10F84 for ; Fri, 30 Aug 2013 21:16:52 +0000 (UTC) Received: (qmail 37674 invoked by uid 500); 30 Aug 2013 21:16:52 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 37649 invoked by uid 500); 30 Aug 2013 21:16: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 37639 invoked by uid 99); 30 Aug 2013 21:16:52 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 21:16:52 +0000 Date: Fri, 30 Aug 2013 21:16:52 +0000 (UTC) From: "Jonathan Hsieh (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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:all-tabpanel ] Jonathan Hsieh updated HBASE-9359: ---------------------------------- Release Note: The signature for several methods on Put, Result, ColumnInterpreter, and BaseRegionObserver have been modified to use the Cell interface instead of KeyValues. Applications need to convert KeyValue and List to Cell and List. The changes are summarized here: Put: - public List get(byte[] family, byte[] qualifier) + public List get(byte[] family, byte[] qualifier) Result: - public KeyValue[] raw() { + public Cell[] raw() { - public List list() { + public List list() { - public List getColumn(byte [] family, byte [] qualifier) { + public List getColumn(byte [] family, byte [] qualifier) { - public KeyValue getColumnLatest(byte [] family, byte [] qualifier) { + public Cell getColumnLatest(byte [] family, byte [] qualifier) { - public KeyValue getColumnLatest(byte [] family, int foffset, int flength, + public Cell getColumnLatest(byte [] family, int foffset, int flength, byte [] qualifier, int qoffset, int qlength) { For extension interfaces BaseRegionObserver and ColumnInterpreter, we have kept both the old and new signature, including a shim that has the abstract implementation helper have the new call the old implementation. For the shim to handle the List -> List conversion, we use an expensive naive array copy. It is strongly recommended that the new coprocessors are updated to override the new undeprecated API. ColumnInterpreter: (abstract class) - public abstract T getValue(byte[] colFamily, byte[] colQualifier, KeyValue kv) + public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell kv) BaseRegionObserver: (abstract class) RegionObserver: (inteface) void preGet(final ObserverContext c, final Get get, - final List result) + final List result) throws IOException; void postGet(final ObserverContext c, final Get get, - final List result) + final List result) throws IOException; was: The signature for several methods on Put, Result, ColumnInterpreter, and BaseRegionObserver have been modified to use the Cell interface instead of KeyValues. The changes are summarized here: Put: - public List get(byte[] family, byte[] qualifier) + public List get(byte[] family, byte[] qualifier) Result: - public KeyValue[] raw() { + public Cell[] raw() { - public List list() { + public List list() { - public List getColumn(byte [] family, byte [] qualifier) { + public List getColumn(byte [] family, byte [] qualifier) { - public KeyValue getColumnLatest(byte [] family, byte [] qualifier) { + public Cell getColumnLatest(byte [] family, byte [] qualifier) { - public KeyValue getColumnLatest(byte [] family, int foffset, int flength, + public Cell getColumnLatest(byte [] family, int foffset, int flength, byte [] qualifier, int qoffset, int qlength) { For extension interfaces BaseRegionObserver and ColumnInterpreter, we have kept both the old and new signature, including a shim that has the abstract implementation helper have the new call the old implementation. For the shim to handle the List -> List conversion, we use an expensive naive array copy. It is strongly recommended that the new coprocessors are updated to override the new undeprecated API. ColumnInterpreter: (abstract class) - public abstract T getValue(byte[] colFamily, byte[] colQualifier, KeyValue kv) + public abstract T getValue(byte[] colFamily, byte[] colQualifier, Cell kv) BaseRegionObserver: (abstract class) RegionObserver: (inteface) void preGet(final ObserverContext c, final Get get, - final List result) + final List result) throws IOException; void postGet(final ObserverContext c, final Get get, - final List result) + final List result) throws IOException; > 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