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 CD698FB07 for ; Fri, 5 Apr 2013 00:16:15 +0000 (UTC) Received: (qmail 73372 invoked by uid 500); 5 Apr 2013 00:16:15 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 73345 invoked by uid 500); 5 Apr 2013 00:16:15 -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 73333 invoked by uid 99); 5 Apr 2013 00:16:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 00:16:15 +0000 Date: Fri, 5 Apr 2013 00:16:15 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-8273) HColumnDescriptor setters should return void 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-8273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13623100#comment-13623100 ] Ted Yu commented on HBASE-8273: ------------------------------- For the setters, there is a way to achieve compatibility between 0.92.x and 0.94.7 while keeping compatibility between 0.94.6 and 0.94.7. Below is an example: {code} Index: hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java =================================================================== --- hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java (revision 1464795) +++ hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java (working copy) @@ -572,6 +572,10 @@ return this; } + public void setMaxVersions(Integer maxVersions) { + setValue(HConstants.VERSIONS, Integer.toString(maxVersions)); + cachedMaxVersions = maxVersions; + } /** * @return The storefile/hfile blocksize for this column family. */ {code} Client previously compiled with 0.94.x release would pick up the existing setter in 0.94: {code} public HColumnDescriptor setMaxVersions(int maxVersions) { {code} Client previously compiled with 0.92.x release would pick up the new setter. > HColumnDescriptor setters should return void > -------------------------------------------- > > Key: HBASE-8273 > URL: https://issues.apache.org/jira/browse/HBASE-8273 > Project: HBase > Issue Type: Bug > Reporter: Ted Yu > > See discussion on dev@ mailing list, entitled 'Does compatibility between versions also mean binary compatibility?' > Synopsis from that thread: > HBASE-5357 "Use builder pattern in HColumnDescriptor" changed the > method signatures by changing "void" to "HColumnDescriptor" so it' not > the same methods anymore. > if you invoke setters > on HColumnDescriptor as you'll get: > java.lang.NoSuchMethodError: > org.apache.hadoop.hbase.HColumnDescriptor.setMaxVersions(I)V -- 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