|
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).
|