KEMBAR78
Unable to connect to BigTable emulator with v2.0.0 · Issue #3518 · googleapis/java-bigtable-hbase · GitHub
Skip to content

Unable to connect to BigTable emulator with v2.0.0 #3518

@nielsbasjes

Description

@nielsbasjes

TL;DR:
A working application using bigtable-hbase-2.x 1.26.3 stops working after updating to 2.0.0 with
java.lang.IllegalStateException: BigtableInstanceAdminSettings doesn't supported on Emulator

Environment details

  1. Specify the API at the beginning of the title. General, Core, and Other are also allowed as types
  2. OS type and version: Ubuntu 20.04 LTS
  3. Java version: 11.0.13
  4. Version(s): 1.26.3 (works) and 2.0.0 (does not work)

Steps to reproduce

Make a junit test in Java with the code fragment provided below.
Use the dependency com.google.cloud.bigtable:bigtable-hbase-2.x:1.26.3

Output:

We have a connection: AbstractBigtableConnection{project=MyTestProject, instance=HBaseTestingInstance, dataHost=127.0.0.1, tableAdminHost=127.0.0.1}

Now change the dependency to com.google.cloud.bigtable:bigtable-hbase-2.x:2.0.0
and you get the exception (stacktrace below)
java.lang.IllegalStateException: BigtableInstanceAdminSettings doesn't supported on Emulator

Code example

        Configuration config = BigtableConfiguration.configure("MyTestProject", "HBaseTestingInstance");
        config.set(BIGTABLE_EMULATOR_HOST_KEY, getDockerIpAddress() + ":" + getDockerBigtablePort());

        try (Connection connection = ConnectionFactory.createConnection(config)) {
            LOG.info("We have a connection: {}", connection);
        }

Stack trace

Caused by: java.lang.IllegalStateException: BigtableInstanceAdminSettings doesn't supported on Emulator
	at com.google.common.base.Preconditions.checkState(Preconditions.java:502)
	at com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings.newBuilder(BigtableInstanceAdminSettings.java:118)
	at com.google.cloud.bigtable.hbase.wrappers.veneer.BigtableHBaseVeneerSettings.buildBigtableInstanceAdminSettings(BigtableHBaseVeneerSettings.java:369)
	at com.google.cloud.bigtable.hbase.wrappers.veneer.BigtableHBaseVeneerSettings.<init>(BigtableHBaseVeneerSettings.java:168)
	at com.google.cloud.bigtable.hbase.wrappers.veneer.BigtableHBaseVeneerSettings.create(BigtableHBaseVeneerSettings.java:156)
	at com.google.cloud.bigtable.hbase.wrappers.BigtableHBaseSettings.create(BigtableHBaseSettings.java:42)
	at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:111)
	at org.apache.hadoop.hbase.client.AbstractBigtableConnection.<init>(AbstractBigtableConnection.java:86)
	at com.google.cloud.bigtable.hbase2_x.BigtableConnection.<init>(BigtableConnection.java:61)
	... 41 more

External references such as API reference guides

  • ?

Any additional information below

Following these steps guarantees the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions