Skip to content

Shaded jar version with hbase client shaded and included #2139

@srwilson

Description

@srwilson

We are currently using the CDH 5.11 for HBase client in our service code, specifically hbase-client-1.2.0-cdh5.11.1. We are also including com.google.cloud.bigtable:bigtable-hbase-1.x-shaded:1.10.0 as a dependency. It appears the bigtable hbase library is using a more recent version of the hbase client 1.4.9. This causes some issues because the newer hbase client has some changes from our 1.2.0-based CDH client version.

Specifically we see on an Admin.listTables() call we get this stack trace

Exception in thread "main" java.io.IOException: Failed to getTableDescriptor() on action_dispatches
	at org.apache.hadoop.hbase.client.AbstractBigtableAdmin.getTableDescriptor(AbstractBigtableAdmin.java:265)
	at org.apache.hadoop.hbase.client.AbstractBigtableAdmin.getTableDescriptors(AbstractBigtableAdmin.java:170)
	at org.apache.hadoop.hbase.client.AbstractBigtableAdmin.listTables(AbstractBigtableAdmin.java:164)
	at com.sift.ScottTest.main(ScottTest.java:44)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.HTableDescriptor.addFamily(Lorg/apache/hadoop/hbase/HColumnDescriptor;)Lorg/apache/hadoop/hbase/HTableDescriptor;
	at com.google.cloud.bigtable.hbase.adapters.admin.TableAdapter.adapt(TableAdapter.java:97)
	at org.apache.hadoop.hbase.client.AbstractBigtableAdmin.getTableDescriptor(AbstractBigtableAdmin.java:260)
	... 3 more

This is due to the fact that hbase mainline client added returning the HTableDescriptor to the addFamily() method. https://github.com/apache/hbase/blob/763f27f583cf8fd7ecf79fb6f3ef57f1615dbf9b/hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java#L879

Upgrading our service code to use mainline hbase client version 1.4.9 would be a major project for us so it's not really feasible.

Is there way we could a get a version of the bigtable hbase client jar that also shades the hbase client it is using? Current that shaded jar that's produced simply excludes the hbase-client dependency.

Metadata

Metadata

Assignees

Labels

api: bigtableIssues related to the googleapis/java-bigtable-hbase API.type: questionRequest for information or clarification. Not an issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions