Skip to content

feat: introduce Bigtable Admin V2 clients for Selective GAPIC#13173

Merged
jinseopkim0 merged 22 commits into
mainfrom
bigtable-admin-client
Jun 5, 2026
Merged

feat: introduce Bigtable Admin V2 clients for Selective GAPIC#13173
jinseopkim0 merged 22 commits into
mainfrom
bigtable-admin-client

Conversation

@jinseopkim0

Copy link
Copy Markdown
Contributor

This PR introduces the modern BigtableTableAdminClientV2 and BigtableInstanceAdminClientV2 clients in java-bigtable as handwritten entry points for the Selective GAPIC hierarchy.

It is a migration of the original PR from the split repository (googleapis/java-bigtable#2889) into the google-cloud-java monorepo.

Key Changes

1. Core V2 Clients & Callables

  • BigtableInstanceAdminClientV2: Recreates the standardized admin entry point extending BaseBigtableInstanceAdminClient.
  • BigtableTableAdminClientV2: Recreates the administrative client extending BaseBigtableTableAdminClient. It relocates manual wrappers for Critical User Journeys (CUJs) like chained Long-Running Operations (awaitOptimizeRestoredTable) and consistency token polling (waitForConsistency).
  • AwaitConsistencyCallableV2: Implements a completely decoupled, lightweight utility callable for polling consistency tokens, ensuring the V2 administrative client stack has no compile-time dependency on the data client package.

2. Code Generation & POM Rules

  • owlbot.py: Added a post-processing rule to remove the final modifier from the close() method in BaseBigtable*AdminClient classes to allow handwritten subclass overrides.
  • pom.xml: Promoted the scope of grpc-google-cloud-bigtable-admin-v2 from test to compile scope to support V2 admin gRPC descriptors and classes in production code.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces modern V2 Admin clients for Bigtable, specifically BigtableInstanceAdminClientV2 and BigtableTableAdminClientV2, which provide enhanced convenience methods for consistency polling and table restoration optimization. The changes also include modifications to the base admin clients and OwlBot configuration to allow for custom lifecycle management of background executors. Review feedback identifies several critical issues in the new Table Admin client: a blocking call within an asynchronous method that should utilize ApiFutures.transformAsync, potential resource management conflicts when shutting down shared executors, and a logic error in the awaitTermination implementation that fails to account for elapsed time when calling the superclass method.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces modern Cloud Bigtable Admin clients, BigtableInstanceAdminClientV2 and BigtableTableAdminClientV2, providing enhanced convenience methods for consistency polling and table optimization. Key changes include the addition of AwaitConsistencyCallableV2 for automated polling and modifications to the base admin clients to allow overriding the close() method for better resource management. Review feedback identifies a performance issue where a blocking .get() call is used in an asynchronous method and suggests using a more accurate RPC method descriptor for operation parsing.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces "V2" versions of the Bigtable Instance and Table Admin clients, providing enhanced convenience methods for automated consistency polling and chained long-running operations. Key changes include the addition of BigtableTableAdminClientV2 and AwaitConsistencyCallableV2, along with modifications to the base clients to allow overriding the close() method for better resource management. Review feedback highlighted several improvement opportunities: refactoring awaitOptimizeRestoredTable to avoid blocking the calling thread, using ApiExceptions for consistent error translation in synchronous methods, and improving documentation and code comments regarding stub-based initialization and the use of placeholder descriptors.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces modern Cloud Bigtable Admin clients, BigtableInstanceAdminClientV2 and BigtableTableAdminClientV2, which provide enhanced convenience methods for managing instances and tables, including automated consistency polling and chained long-running operations. To support these new clients, the close() method in the base admin clients was made non-final, and the grpc-google-cloud-bigtable-admin-v2 dependency scope was updated. A critical issue was identified in BigtableTableAdminClientV2 where awaitOptimizeRestoredTable incorrectly blocks the calling thread; this should be refactored to use ApiFutures.transformAsync for proper asynchronous execution.

@jinseopkim0 jinseopkim0 marked this pull request as ready for review May 12, 2026 21:02
@jinseopkim0 jinseopkim0 requested review from a team as code owners May 12, 2026 21:02
@jinseopkim0 jinseopkim0 requested a review from mutianf June 3, 2026 18:11

@igorbernstein2 igorbernstein2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!
Please fork the models and then we should be good to go

@jinseopkim0 jinseopkim0 requested a review from a team as a code owner June 5, 2026 01:20
@jinseopkim0 jinseopkim0 requested a review from mutianf June 5, 2026 15:07
@jinseopkim0 jinseopkim0 enabled auto-merge (squash) June 5, 2026 15:45
@jinseopkim0 jinseopkim0 merged commit 9567312 into main Jun 5, 2026
182 of 184 checks passed
@jinseopkim0 jinseopkim0 deleted the bigtable-admin-client branch June 5, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants