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 4ACAA10651 for ; Wed, 7 Aug 2013 20:51:48 +0000 (UTC) Received: (qmail 6386 invoked by uid 500); 7 Aug 2013 20:51:48 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 6357 invoked by uid 500); 7 Aug 2013 20:51:48 -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 6348 invoked by uid 99); 7 Aug 2013 20:51:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Aug 2013 20:51:48 +0000 Date: Wed, 7 Aug 2013 20:51:48 +0000 (UTC) From: "Jonathan Hsieh (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-9142) Mutation#getFamilyMap() return type change between HBase 94 and 96 breaks downstream apps 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-9142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13732716#comment-13732716 ] Jonathan Hsieh commented on HBASE-9142: --------------------------------------- First -- I think life is easier in you should probably create a new hbase95 sink. :) -- this is a case where 0.94 didn't specify external visibility explictly yet and we didn't preserve compat. I added a method back and named the new method as getFamilyCellMap. Along the way, I went down the rathole of removing what I believe is a java collection of generics anti-pattern along the way. (which if it ends up being clean, we should get in to 0.95 before the api freezes). This may have been intentional by my gut says it should be removed. Specifically it seems that defining this method with List where List is sufficient has caused superfluous casts and extra types to percolated throughout the code. Having gone through -client, -common, and -server, none of the uses of the List instances require methods in Cell's implementor KeyValue that aren't in the Cell interface. A List can hold KeyValue instances doesn't need have a List type. Since the maps is essentially exposed and can be used for read/write access, it should be the collection element typed should be typed invariantly. See [1] for short primer and examples. [1] http://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science) > Mutation#getFamilyMap() return type change between HBase 94 and 96 breaks downstream apps > ----------------------------------------------------------------------------------------- > > Key: HBASE-9142 > URL: https://issues.apache.org/jira/browse/HBASE-9142 > Project: HBase > Issue Type: Bug > Reporter: Hari Shreedharan > Assignee: Jonathan Hsieh > Priority: Critical > Fix For: 0.95.2 > > > In Hbase-94, Mutation#getFamilyMap() had signature: > public Map> getFamilyMap() > In Hbase-96 it is: > public NavigableMap> getFamilyMap() > I understand this might not be an easy fix or even a possible one - but it breaks downstream apps in a nasty way. If the app needs to process the individual columns, then the whole logic is now different. Is there a way to work around this, if this cannot be fixed? -- 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