[ISSUE] (TEPHRA-53) Add HBase 1.0 compatibility module

9 views
Skip to first unread message

Gary Helmling (JIRA)

unread,
Jun 8, 2015, 2:03:41 PM6/8/15
to tephr...@googlegroups.com
Gary Helmling commented on an issue
 
Re: Add HBase 1.0 compatibility module

In testing, I've run into a compatibility issue when trying to run a program compiled against the Apache HBase 1.0.0 release artifacts on a cluster using CDH 5.4.2 (HBase 1.0.0-cdh5.4.2, Hadoop 2.6.0-cdh5.4.2). A simple test program will throw the following exception:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)Lorg/apache/hadoop/hbase/HTableDescriptor;
	at co.cask.hbasetest.HBaseTest.createTable(HBaseTest.java:34)
	at co.cask.hbasetest.HBaseTest.doMain(HBaseTest.java:49)
	at co.cask.hbasetest.HBaseTest.main(HBaseTest.java:67)

This occurs on the 5th line of the following code snippet:

HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName));
for (byte[] family : columnFamilies) {
  HColumnDescriptor columnDesc = new HColumnDescriptor(family);
  columnDesc.setMaxVersions(Integer.MAX_VALUE);
  desc.addFamily(columnDesc);
}
admin.createTable(desc);

I don't see any incompatible changes in the HBase classes, so I'm looking into possible incompatible changes between the Hadoop versions used (Apache HBase 1.0.0 is compiled against Hadoop 2.5.1, CDH 5.4.2 HBase is compiled against Hadoop 2.6.0-cdh5.4.2).

Add Comment Add Comment
 
Tephra / New Feature TEPHRA-53
Add HBase 1.0 compatibility module
With an HBase 1.0 release nearing, we should add a 1.0 compatibility module.
This message was sent by Atlassian JIRA (v6.1.5#6160-sha1:a61a0fc)
Atlassian logo

Gary Helmling (JIRA)

unread,
Jun 8, 2015, 2:41:42 PM6/8/15
to tephr...@googlegroups.com
Gary Helmling commented on an issue

Thanks to Terence Yim, tracked this down to a change in the return type of HTableDescriptor.addFamily(). In https://issues.apache.org/jira/browse/HBASE-12046 (present in Apache HBase 1.0.0), the return type was changed from void to HTableDescriptor. CDH 5.4 appears to contain a revert of this patch to maintain binary compatibility with previous versions:

commit 09aa1daa814cb68b1f3224aa09654db42c05c002
Author: Matteo Bertozzi <matteo....@cloudera.com>
Date:   Mon Dec 15 18:24:49 2014 +0000

    CLOUDERA-BUILD Compatibility Revert HBASE-10841 and HBASE-12046 HTD/HCD setters should be builder-style

However, this means there is no easy way to accommodate both releases with the same artifact. We will either need to compile separate compatibility binaries against the two versions, or else use reflection to span the gap. A number of other methods were impacted by HBASE-12046, so using reflection might be painful.

Gary Helmling (JIRA)

unread,
Jun 8, 2015, 4:32:43 PM6/8/15
to tephr...@googlegroups.com
Gary Helmling commented on an issue

Started a thread on the CDH users list for any comments or suggestions: https://groups.google.com/a/cloudera.org/forum/#!topic/cdh-user/KaGc7Ve7egs

Gary Helmling (JIRA)

unread,
Jun 9, 2015, 6:06:42 PM6/9/15
to tephr...@googlegroups.com
Gary Helmling updated an issue

Attaching a Java API compatibility report of Apache HBase 1.0.0 vs CDH 5.4 HBase, courtesy of Sean Busbey at Cloudera.

Change By: Gary Helmling
Attachment: hbase_1.0.0_vs_cdh5.4.2-release_compat_report.html

Gary Helmling (JIRA)

unread,
Jun 19, 2015, 5:13:43 PM6/19/15
to tephr...@googlegroups.com
Gary Helmling commented on an issue
With an HBase 1.0 release nearing, we should add a 1.0 compatibility module.

Gary Helmling (JIRA)

unread,
Jun 22, 2015, 7:20:42 PM6/22/15
to tephr...@googlegroups.com
Gary Helmling resolved an issue as Fixed
 

Merged to develop

Change By: Gary Helmling
Status: In Progress Resolved
Fix Version/s: 0.5.1
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages