[
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