Upgrading Client Libraries

This page explains how to upgrade a previously installed Cloud Bigtable client library. If you need to install a client library for the first time, follow the instructions for your preferred programming language at Cloud Bigtable Client Libraries.

HBase client for Java

If you're upgrading from version 1.0 or later of the HBase client for Java, the only change you need to make is to update the version number in the configuration. You don't need to update your code.

If you're upgrading from pre-1.0 HBase clients, complete the following steps:

  1. Update your dependencies to use the newest client library and remove artifacts that you no longer need:

    • Remove the bigtable-hbase-1.0, bigtable-hbase-1.1, and bigtable-hbase-1.2 artifacts from your dependencies if they are present.

    • Remove netty-tcnative-boringssl-static from your dependencies unless another part of your application requires it.

    • Add one of the following artifacts to your dependencies:

  2. Update your configuration settings for connecting to Cloud Bigtable.

    • If the configuration settings in your code or in an hbase-site.xml file include a value for hbase.client.connection.impl, change the value to com.google.cloud.bigtable.hbase1_x.BigtableConnection.

    • If you use the BigtableConnection class directly, update your code to use com.google.cloud.bigtable.hbase1_x.BigtableConnection instead.

    • If you use an hbase-site.xml file to connect to Cloud Bigtable:

      • Add the property google.bigtable.instance.id if it is not present. Set the property value to your instance ID.
      • Remove the property google.bigtable.cluster.name if it is present.
      • Remove the property google.bigtable.zone.name if it is present.
    • If you connect to Cloud Bigtable by calling BigtableConfiguration.connect(), update your code as shown in the following example:

      // Old code
      BigtableConfiguration.connect(projectId, zone, clusterId);
      
      // New code
      BigtableConfiguration.connect(projectId, instanceId);
      
  3. Redeploy your application in all of your environments, including local development, testing, staging, and production.

For a list of releases for the HBase client for Java, see the release history on GitHub.

Go

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

To download the client library, visit the code repository on GitHub.

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)

For a list of releases for the Go client library, see the release history on GitHub.

OpenTSDB

If you are using Cloud Bigtable via OpenTSDB, complete the following steps:

  1. Add an explicit dependency on version 0.4.0 or later of the asyncbigtable artifact.
  2. Upgrade OpenTSDB to version to 2.3.1 or later.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Bigtable Documentation