Skip to content

bigtable-hbase-2.x-hadoop incompatible with hbase-shaded-client 2.x #2601

Description

The bigtable-hbase-2.x-hadoop dependency expects hbase-shaded-client 2.x, while the code is compiled against HBase 1.x.

Steps to reproduce

  1. Setup a Java project and include the dependency com.google.cloud.bigtable:bigtable-hbase-2.x-hadoop:1.15.0. This dependency transitively depends on org.apache.hbase:hbase-shaded-client:2.2.3
  2. call getClusterMetrics() on a AbstractBigtableAdmin

Code example

org.apache.hadoop.hbase.client.Connection connection = createConnection();
org.apache.hadoop.hbase.client.AbstractBigtableAdmin admin = connection.getAdmin().
int size = admin.getClusterMetrics().getLiveServerMetrics().size();

Stack trace

Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.ClusterStatus: method <init>()V not found
	at org.apache.hadoop.hbase.client.AbstractBigtableAdmin$2.<init>(AbstractBigtableAdmin.java:705)
	at org.apache.hadoop.hbase.client.AbstractBigtableAdmin.getClusterStatus(AbstractBigtableAdmin.java:705)
	at com.google.cloud.bigtable.hbase2_x.BigtableAdmin.getClusterMetrics(BigtableAdmin.java:787)
	at org.apache.hadoop.hbase.client.Admin.getClusterMetrics(Admin.java:1564)
	at com.privitar.agrotera.adapters.cluster.hadoop.hbase.apache.admin.ApacheHBaseAdmin.getNumberOfRegionServersInCluster(ApacheHBaseAdmin.java:43)

Metadata

Metadata

Assignees

Labels

api: bigtableIssues related to the googleapis/java-bigtable-hbase API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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