Skip to content

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

Open
jinseopkim0 wants to merge 20 commits intomainfrom
refactor-consistency-request-2
Open

feat: introduce Bigtable Admin V2 clients for Selective GAPIC#2889
jinseopkim0 wants to merge 20 commits intomainfrom
refactor-consistency-request-2

Conversation

@jinseopkim0
Copy link
Copy Markdown
Contributor

This commit adds BigtableTableAdminClientV2 and BigtableInstanceAdminClientV2, which extend the autogenerated base clients. These classes serve as the new, independent entry points for the Selective GAPIC hierarchy.

For BigtableTableAdminClientV2, the manual wrappers for Critical User Journeys (CUJs) like awaitOptimizeRestoredTable and waitForConsistency have been relocated from the legacy client. It utilizes the new context-free ConsistencyRequest factories introduced in the previous refactoring step.

For BigtableInstanceAdminClientV2, the class acts as a standardized entry point, as no manual overrides were required from the legacy client.

b/502616786

jinseopkim0 and others added 2 commits April 15, 2026 14:35
This commit updates the internal plumbing for `ConsistencyRequest` and
`AwaitConsistencyCallable` to support fully qualified table names without
breaking the existing public API for the legacy `BigtableTableAdminClient`.

b/502616786
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: bigtable Issues related to the googleapis/java-bigtable API. labels Apr 15, 2026
@jinseopkim0 jinseopkim0 force-pushed the refactor-consistency-request-2 branch 2 times, most recently from 979d668 to eabb07a Compare April 15, 2026 20:03
This commit adds `BigtableTableAdminClientV2` and `BigtableInstanceAdminClientV2`,
which extend the autogenerated base clients. These classes serve as the new,
independent entry points for the Selective GAPIC hierarchy.

For `BigtableTableAdminClientV2`, the manual wrappers for Critical User
Journeys (CUJs) like `awaitOptimizeRestoredTable` and `waitForConsistency`
have been relocated from the legacy client. It utilizes the new context-free
ConsistencyRequest factories introduced in the previous refactoring step.

For `BigtableInstanceAdminClientV2`, the class acts as a standardized entry
point, as no manual overrides were required from the legacy client.

b/502616786
@jinseopkim0 jinseopkim0 force-pushed the refactor-consistency-request-2 branch from 849de6d to 00db638 Compare April 15, 2026 20:12
@jinseopkim0 jinseopkim0 marked this pull request as ready for review April 16, 2026 00:35
@jinseopkim0 jinseopkim0 requested review from a team as code owners April 16, 2026 00:35
@jinseopkim0 jinseopkim0 requested a review from lqiu96 April 16, 2026 00:36
Base automatically changed from refactor-consistency-request to main April 22, 2026 19:23
@jinseopkim0 jinseopkim0 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 23, 2026
@jinseopkim0 jinseopkim0 added the kokoro:run Add this label to force Kokoro to re-run the tests. label Apr 23, 2026
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Apr 23, 2026
@jinseopkim0 jinseopkim0 added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Apr 23, 2026
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Apr 23, 2026
@jinseopkim0 jinseopkim0 requested a review from lqiu96 April 24, 2026 20:07
Copy link
Copy Markdown
Member

@lqiu96 lqiu96 left a comment

Choose a reason for hiding this comment

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

Changes overall LGTM.


private AwaitConsistencyCallable createAwaitConsistencyCallable(
BigtableTableAdminStubSettings settings) throws IOException {
ClientContext clientContext = ClientContext.create(settings);
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 is not great, ClientContexts are pretty heavy (they create a new grpc channel). I think the only reason you need from the context is the clock & executor. I think you'll be better off creating those for this child class and not trying getting access to the ClientContext

BigtableTableAdminStubSettings settings) throws IOException {
ClientContext clientContext = ClientContext.create(settings);
// TODO(igorbernstein2): expose polling settings
RetrySettings pollingSettings =
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.

Lets extract this to a constant

MethodDescriptor.<Void, Operation>newBuilder()
.setType(MethodType.UNARY)
.setFullMethodName(
"google.bigtable.admin.v2.BigtableTableAdmin/OptimizeRestoredTable")
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.

I wonder if it would be better to declare a dep on the grpc stubs and pull this from the MethodDescriptor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/java-bigtable API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants