Upgrading Cloud Bigtable Client Libraries

This page explains changes that you will need to make in your code when you upgrade from earlier versions of the Cloud Bigtable client libraries.

Java

Upgrading to 1.0.0-pre4

In version 1.0.0-pre4, the bigtable-hbase-1.0, bigtable-hbase-1.1, bigtable-hbase-1.2, and bigtable-hbase-1.3 artifacts are no longer provided. If you were using one of these artifacts, see Using the HBase Client for Java with Maven for information about how to choose a replacement.

In addition, version 1.0.0-pre4 includes a new Apache Beam-compatible version of the import/export tool. For instructions on how to use the new tool, see Exporting Data as Sequence Files and Importing Data from Sequence Files.

Upgrading to 1.0.0-pre3

Version 1.0.0-pre3 introduces a new version of the Cloud Dataflow connector. The new connector is compatible with Apache Beam. If you are using the previous version of the connector, update your code to use the new version. See the Cloud Dataflow release notes for information about migrating from the Dataflow 1.x SDK to the Dataflow 2.x (Beam-compatible) SDK.

Upgrading to 1.0.0-pre2

In version 1.0.0-pre2, the Cloud Bigtable Maven artifacts include the netty-tcnative-boringssl-static library. You should update your Maven project to remove the dependency on the netty-tcnative-boringssl-static artifact.

Upgrading to 1.0.0-pre1

Version 1.0.0-pre1 provides a new set of Maven artifacts:

You must update your Maven project to use the most appropriate one of these artifacts.

In addition, you must update your Maven project to remove the dependency on the hbase-client artifact. This artifact is no longer required.

Finally, if your configuration settings (in your code or in an hbase-site.xml file) include a value for hbase.client.connection.impl, you must change the value to com.google.cloud.bigtable.hbase1_x.BigtableConnection.

Upgrading to 0.9.7.1

No special steps are necessary when upgrading from version 0.9.7 to version 0.9.7.1.

If you are upgrading from an earlier version, see the upgrade instructions for earlier versions below.

Upgrading to 0.9.7

No special steps are necessary when upgrading from version 0.9.6.2 to version 0.9.7.

If you are upgrading from an earlier version, see the upgrade instructions for earlier versions below.

Upgrading to 0.9.6.2

With version 0.9.6.2, you must upgrade to version 1.1.33.Fork26 of the netty-tcnative-boringssl-static library.

Upgrading to 0.9.5.1

No special steps are necessary when upgrading from version 0.9.4 to version 0.9.5.1.

If you are upgrading from an earlier version, see the upgrade instructions for earlier versions below.

Upgrading to 0.9.4

No special steps are necessary when upgrading from version 0.9.3 to version 0.9.4.

If you are upgrading from an earlier version, see the upgrade instructions for earlier versions below.

Upgrading to 0.9.3

No special steps are necessary when upgrading from version 0.9.2 to version 0.9.3.

If you are upgrading from an earlier version, see the upgrade instructions for earlier versions below.

Upgrading to 0.9.2

No special steps are necessary when upgrading from version 0.9.1 to version 0.9.2.

If you are upgrading from an earlier version, see the upgrade instructions for earlier versions below.

Upgrading to 0.9.1

With version 0.9.1, you must upgrade to version 1.1.33.Fork19 of the netty-tcnative-boringssl-static library.

In addition, you can use a single netty-tcnative-boringssl-static JAR file for all supported platforms (Linux, macOS, and Windows). You no longer need to use an OS-specific classifier in your Maven project. The following example shows how to add the required artifact to your pom.xml file:

<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-tcnative-boringssl-static</artifactId>
  <version>1.1.33.Fork19</version>
</dependency>

Upgrading to 0.9.0

Version 0.9.0 changes the way you connect to Cloud Bigtable. Instead of specifying a cluster ID and zone, you specify an instance ID. You can find the instance ID by visiting the Google Cloud Platform Console.

Updating hbase-site.xml

If you use an hbase-site.xml file to connect to Cloud Bigtable, you must make the following changes:

  • Add the property google.bigtable.instance.id, with the value set to your instance ID.
  • Remove the property google.bigtable.cluster.name.
  • Remove the property google.bigtable.zone.name.

Updating BigtableConfiguration

If you connect to Cloud Bigtable by calling BigtableConfiguration.connect(), you must update your code as shown below:

// Old code
BigtableConfiguration.connect(projectId, zone, clusterId);

// New code
BigtableConfiguration.connect(projectId, instanceId);

Updating the Dataflow connector

If you use the Cloud Dataflow connector for Cloud Bigtable, you must update the code that creates a CloudBigtableScanConfiguration as shown below:

// Old code
CloudBigtableScanConfiguration config = new CloudBigtableScanConfiguration.Builder()
    .withProjectId("project-id")
    .withClusterId("cluster-id")
    .withZoneId("zone")
    .withTableId("table")
    .build();

// New code
CloudBigtableScanConfiguration config = new CloudBigtableScanConfiguration.Builder()
    .withProjectId("project-id")
    .withInstanceId("instance-id")
    .withTableId("table")
    .build();

Go

June 2016 changes

In June 2016, the Go client was updated to change the way you connect to Cloud Bigtable. Instead of specifying a cluster ID and zone, you specify an instance ID. You can find the instance ID by visiting the Google Cloud Platform Console.

You must update your code as shown below:

// Old code
adminClient, err := bigtable.NewAdminClient(ctx, project, zone, cluster)
client, err := bigtable.NewClient(ctx, project, zone, cluster)

// New code
adminClient, err := bigtable.NewAdminClient(ctx, project, instance)
client, err := bigtable.NewClient(ctx, project, instance)

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Bigtable Documentation