Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengupgrade library klien
Halaman ini menjelaskan cara mengupgrade library klien Cloud Bigtable yang sebelumnya diinstal. Jika Anda perlu menginstal library klien untuk pertama kalinya, ikuti petunjuk untuk bahasa pemrograman pilihan Anda di Library Klien Cloud Bigtable.
Klien HBase untuk Java
Jika Anda mengupgrade dari klien HBase untuk Java versi 1.0 atau yang lebih baru, satu-satunya perubahan yang perlu Anda lakukan adalah memperbarui nomor versi
dalam konfigurasi. Anda tidak perlu memperbarui kode.
Jika Anda mengupgrade dari klien HBase pra-1.0, selesaikan langkah-langkah
berikut:
Perbarui dependensi Anda untuk menggunakan library klien terbaru dan hapus artefak yang tidak lagi Anda perlukan:
Hapus artefak bigtable-hbase-1.0, bigtable-hbase-1.1, dan
bigtable-hbase-1.2 dari dependensi Anda jika ada.
Hapus netty-tcnative-boringssl-static dari dependensi Anda
kecuali jika bagian lain aplikasi Anda memerlukannya.
Tambahkan salah satu artefak berikut ke dependensi Anda, bergantung pada
kasus penggunaan Anda. Versi 2.x menyertakan klien asinkron HBase yang tidak dimiliki versi 1.x.
bigtable-hbase-1.x atau bigtable-hbase-2.x: Gunakan untuk aplikasi mandiri
yang dapat Anda kontrol dependensinya.
bigtable-hbase-1.x-hadoop atau bigtable-hbase-2.x-hadoop: Gunakan di
lingkungan Hadoop.
bigtable-hbase-1.x-shaded atau bigtable-hbase-2.x-shaded: Gunakan di
lingkungan selain Hadoop yang memerlukan komponen versi
sebelumnya seperti protobuf atau Guava.
Perbarui setelan konfigurasi untuk terhubung ke Bigtable.
Jika setelan konfigurasi dalam kode Anda atau dalam file hbase-site.xml
menyertakan nilai untuk hbase.client.connection.impl, ubah
nilainya menjadi com.google.cloud.bigtable.hbase1_x.BigtableConnection.
Jika Anda menggunakan class BigtableConnection secara langsung, perbarui kode Anda untuk
menggunakan com.google.cloud.bigtable.hbase1_x.BigtableConnection.
Jika Anda menggunakan file hbase-site.xml untuk terhubung ke Bigtable:
Tambahkan properti google.bigtable.instance.id jika tidak ada. Tetapkan nilai properti ke ID instance Anda.
Hapus properti google.bigtable.cluster.name jika ada.
Hapus properti google.bigtable.zone.name jika ada.
Jika Anda terhubung ke Bigtable dengan memanggil BigtableConfiguration.connect(), perbarui kode Anda seperti yang ditunjukkan dalam contoh berikut:
// Old codeBigtableConfiguration.connect(projectId,zone,clusterId);// New codeBigtableConfiguration.connect(projectId,instanceId);
Deploy ulang aplikasi Anda di semua lingkungan, termasuk pengembangan, pengujian, staging, dan produksi lokal.
Pada Juni 2016, klien Go mengubah cara untuk terhubung ke
Bigtable. Sebagai ganti menentukan ID cluster dan zona, tentukan ID instance. Anda dapat menemukan ID instance dengan membuka
Google Cloud konsol.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-27 UTC."],[[["\u003cp\u003eThis guide details how to upgrade existing Cloud Bigtable client libraries, specifically for the HBase client for Java and the Go client.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading the HBase client for Java from version 1.0 or later requires only a version number update in the configuration, while pre-1.0 upgrades require dependency and configuration updates.\u003c/p\u003e\n"],["\u003cp\u003eFor pre-1.0 HBase upgrades, you will have to remove certain artifacts, add new ones, change specific configurations and deploy your updated application.\u003c/p\u003e\n"],["\u003cp\u003eThe Go client update from June 2016 requires switching from specifying a cluster ID and zone to specifying an instance ID in the code, with examples provided.\u003c/p\u003e\n"],["\u003cp\u003eBoth the Java and Go clients have their release histories on their respective Github repos.\u003c/p\u003e\n"]]],[],null,["# Upgrading client libraries\n==========================\n\nThis page explains how to upgrade a previously installed Cloud Bigtable\nclient library. If you need to install a client library for the first time,\nfollow the instructions for your preferred programming language at\n[Cloud Bigtable Client Libraries](/bigtable/docs/reference/libraries).\n\nHBase client for Java\n---------------------\n\nIf you're upgrading from version **1.0 or later** of the [HBase client for Java](https://github.com/googleapis/java-bigtable-hbase), the only change you need to make is to update the version number\nin the configuration. You don't need to update your code.\n\nIf you're upgrading from **pre-1.0** HBase clients, complete the following\nsteps:\n\n1. **Update your dependencies** to use the newest client library and remove\n artifacts that you no longer need:\n\n - Remove the `bigtable-hbase-1.0`, `bigtable-hbase-1.1`, and\n `bigtable-hbase-1.2` artifacts from your dependencies if they are present.\n\n - Remove `netty-tcnative-boringssl-static` from your dependencies\n unless another part of your application requires it.\n\n - Add one of the following artifacts to your dependencies, depending on\n your use case. The `2.x` versions include an HBase async client that the\n `1.x` versions don't have.\n\n - `bigtable-hbase-1.x` or `bigtable-hbase-2.x`: Use for standalone applications where you are in control of your dependencies.\n - `bigtable-hbase-1.x-hadoop` or `bigtable-hbase-2.x-hadoop`: Use in Hadoop environments.\n - `bigtable-hbase-1.x-shaded` or `bigtable-hbase-2.x-shaded`: Use in environments other than Hadoop that require earlier versions of components such as [protobuf](https://github.com/google/protobuf) or [Guava](https://github.com/google/guava).\n2. **Update your configuration settings** for connecting to\n Bigtable.\n\n - If the configuration settings in your code or in an `hbase-site.xml`\n file include a value for `hbase.client.connection.impl`, change\n the value to `com.google.cloud.bigtable.hbase1_x.BigtableConnection`.\n\n - If you use the `BigtableConnection` class directly, update your code to\n use `com.google.cloud.bigtable.hbase1_x.BigtableConnection` instead.\n\n - If you use an `hbase-site.xml` file to connect to Bigtable:\n\n - Add the property `google.bigtable.instance.id` if it is not present. Set the property value to your instance ID.\n - Remove the property `google.bigtable.cluster.name` if it is present.\n - Remove the property `google.bigtable.zone.name` if it is present.\n - If you connect to Bigtable by calling\n `BigtableConfiguration.connect()`, update your code as shown in the\n following example:\n\n // Old code\n BigtableConfiguration.connect(projectId, zone, clusterId);\n\n // New code\n BigtableConfiguration.connect(projectId, instanceId);\n\n3. **Redeploy your application** in all of your environments, including local\n development, testing, staging, and production.\n\nFor a list of releases for the HBase client for Java, see the\n[release history on GitHub](https://github.com/googleapis/java-bigtable-hbase/releases).\n\nGo\n---\n\nIn June 2016, the Go client changed the way to connect to\nBigtable. Instead of specifying a cluster ID and zone, specify\nan instance ID. You can find the instance ID by [visiting the\nGoogle Cloud console](https://console.cloud.google.com/bigtable/instances).\n\nTo download the client library, visit the [code repository on GitHub](https://github.com/GoogleCloudPlatform/google-cloud-go).\n\nUpdate your code as shown below: \n\n // Old code\n adminClient, err := bigtable.NewAdminClient(ctx, project, zone, cluster)\n client, err := bigtable.NewClient(ctx, project, zone, cluster)\n\n // New code\n adminClient, err := bigtable.NewAdminClient(ctx, project, instance)\n client, err := bigtable.NewClient(ctx, project, instance)\n\nFor a list of releases for the Go client library, see the\n[release history on GitHub](https://github.com/GoogleCloudPlatform/google-cloud-go/releases).\n\nWhat's next\n-----------\n\n- Read more about [client libraries](/bigtable/docs/reference/libraries).\n- Learn more about how Bigtable [integrates with other tools and Google Cloud services](/bigtable/docs/integrations)."]]