This repository was archived by the owner on May 8, 2026. It is now read-only.
refactor(samples): modernize Admin API examples to use auto-generated GAPIC client - #2829
Merged
Conversation
…surface Adds getBaseClient() to BigtableInstanceAdminClient and marks all legacy handwritten veneer methods as @ObsoleteApi. This mirrors the recent changes to BigtableTableAdminClient in #2806. Tracking Bug: b/475818901
… GAPIC client
Refactors the Bigtable Admin API Java samples to use the modern, auto-generated proto-based methods via `getBaseClient()`. This aligns the samples with the ongoing effort to freeze the legacy handwritten
client and encourage the use of the underlying GAPIC client.
Specific changes:
* Updated `HelloWorld.java`, `TableAdminExample.java`, and `InstanceAdminExample.java` to call methods on the base GAPIC client instead of the legacy wrappers.
* Replaced legacy wrapper models with standard protobuf request objects (e.g., `com.google.bigtable.admin.v2.CreateTableRequest`, `com.google.bigtable.admin.v2.Instance`).
* Updated resource name strings to fully qualified formats (e.g., `projects/{project}/instances/{instance}`).
* Migrated garbage collection rule definitions to use the newly introduced `GcRuleBuilder`.
* Updated `InstanceAdminExampleTest.java` to remain compatible with the modified sample return types.
Tracking Bug: b/475818901
lqiu96
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor(samples): modernize Admin API examples to use auto-generated GAPIC client