diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ebd99e6b87..627419201d 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -4,11 +4,11 @@
# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
-# The @googleapis/api-bigtable @googleapis/api-bigtable-partners is the default owner for changes in this repo
-* @googleapis/cloud-sdk-java-team @googleapis/api-bigtable @googleapis/api-bigtable-partners
+# The @googleapis/api-bigtable is the default owner for changes in this repo
+* @googleapis/cloud-sdk-java-team @googleapis/api-bigtable
# for handwritten libraries, keep codeowner_team in .repo-metadata.json as owner
-**/*.java @googleapis/api-bigtable @googleapis/api-bigtable-partners
+**/*.java @googleapis/api-bigtable @googleapis/cloud-sdk-java-team
# The java-samples-reviewers team is the default owner for samples changes
@@ -18,5 +18,5 @@ samples/**/*.java @googleapis/java-samples-reviewers
samples/snippets/generated/ @googleapis/cloud-sdk-java-team
# Admin Module (Cloud Java Team ownership)
-**/com/google/cloud/bigtable/admin/** @googleapis/api-bigtable @googleapis/api-bigtable-partners @googleapis/cloud-sdk-java-team
-**/com/google/bigtable/admin/** @googleapis/api-bigtable @googleapis/api-bigtable-partners @googleapis/cloud-sdk-java-team
+**/com/google/cloud/bigtable/admin/** @googleapis/api-bigtable @googleapis/cloud-sdk-java-team
+**/com/google/bigtable/admin/** @googleapis/api-bigtable @googleapis/cloud-sdk-java-team
diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml
index c091294465..716fd44a54 100644
--- a/.github/workflows/unmanaged_dependency_check.yaml
+++ b/.github/workflows/unmanaged_dependency_check.yaml
@@ -14,6 +14,6 @@ jobs:
shell: bash
run: .kokoro/build.sh
- name: Unmanaged dependency check
- uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.56.0
+ uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.56.1
with:
bom-path: google-cloud-bigtable-bom/pom.xml
diff --git a/.repo-metadata.json b/.repo-metadata.json
index 154ecb6af5..d40cb5f9c0 100644
--- a/.repo-metadata.json
+++ b/.repo-metadata.json
@@ -13,7 +13,7 @@
"api_id": "bigtable.googleapis.com",
"library_type": "GAPIC_COMBO",
"requires_billing": true,
- "codeowner_team": "@googleapis/api-bigtable @googleapis/api-bigtable-partners",
+ "codeowner_team": "@googleapis/api-bigtable",
"excluded_poms": "google-cloud-bigtable-bom",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559777",
"extra_versioned_modules": "google-cloud-bigtable-emulator,google-cloud-bigtable-emulator-core",
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a6cb57463..c3d288ff92 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## [2.73.0](https://github.com/googleapis/java-bigtable/compare/v2.72.0...v2.73.0) (2026-02-06)
+
+
+### Features
+
+* Add methods to wait for consistency with a token ([#2762](https://github.com/googleapis/java-bigtable/issues/2762)) ([b4a90b2](https://github.com/googleapis/java-bigtable/commit/b4a90b2d0fa2db34067577c2b56d815163dc7282))
+
+
+### Dependencies
+
+* Update shared dependencies ([#2773](https://github.com/googleapis/java-bigtable/issues/2773)) ([33a6d8a](https://github.com/googleapis/java-bigtable/commit/33a6d8ad8a0051550998724f5833a1e803315b47))
+
## [2.72.0](https://github.com/googleapis/java-bigtable/compare/v2.71.0...v2.72.0) (2026-01-30)
diff --git a/README.md b/README.md
index 84a7556298..48d5447756 100644
--- a/README.md
+++ b/README.md
@@ -56,13 +56,13 @@ implementation 'com.google.cloud:google-cloud-bigtable'
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-bigtable:2.72.0'
+implementation 'com.google.cloud:google-cloud-bigtable:2.73.0'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.72.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigtable" % "2.73.0"
```
## Authentication
@@ -452,7 +452,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/history
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigtable.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.72.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigtable/2.73.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/generation_config.yaml b/generation_config.yaml
index 85cd8004ea..206787fb31 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -27,7 +27,7 @@ libraries:
issue_tracker: https://issuetracker.google.com/savedsearches/559777
release_level: stable
distribution_name: com.google.cloud:google-cloud-bigtable
- codeowner_team: '@googleapis/api-bigtable @googleapis/api-bigtable-partners'
+ codeowner_team: '@googleapis/api-bigtable'
api_id: bigtable.googleapis.com
library_type: GAPIC_COMBO
extra_versioned_modules: google-cloud-bigtable-emulator,google-cloud-bigtable-emulator-core
diff --git a/google-cloud-bigtable-bom/pom.xml b/google-cloud-bigtable-bom/pom.xml
index d3c33be259..a690fd6d52 100644
--- a/google-cloud-bigtable-bom/pom.xml
+++ b/google-cloud-bigtable-bom/pom.xml
@@ -3,12 +3,12 @@
4.0.0
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
com.google.cloud
sdk-platform-java-config
- 3.56.0
+ 3.56.1
@@ -63,37 +63,37 @@
com.google.cloud
google-cloud-bigtable
- 2.72.0
+ 2.73.0
com.google.cloud
google-cloud-bigtable-emulator
- 0.209.0
+ 0.210.0
com.google.cloud
google-cloud-bigtable-emulator-core
- 0.209.0
+ 0.210.0
com.google.api.grpc
grpc-google-cloud-bigtable-admin-v2
- 2.72.0
+ 2.73.0
com.google.api.grpc
grpc-google-cloud-bigtable-v2
- 2.72.0
+ 2.73.0
com.google.api.grpc
proto-google-cloud-bigtable-admin-v2
- 2.72.0
+ 2.73.0
com.google.api.grpc
proto-google-cloud-bigtable-v2
- 2.72.0
+ 2.73.0
diff --git a/google-cloud-bigtable-deps-bom/pom.xml b/google-cloud-bigtable-deps-bom/pom.xml
index 488c468781..6c721a599d 100644
--- a/google-cloud-bigtable-deps-bom/pom.xml
+++ b/google-cloud-bigtable-deps-bom/pom.xml
@@ -7,13 +7,13 @@
com.google.cloud
sdk-platform-java-config
- 3.56.0
+ 3.56.1
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
Google Cloud Bigtable Dependency BOM
@@ -68,7 +68,7 @@
com.google.cloud
gapic-libraries-bom
- 1.76.0
+ 1.77.0
pom
import
diff --git a/google-cloud-bigtable-emulator-core/pom.xml b/google-cloud-bigtable-emulator-core/pom.xml
index feb50bd5cd..51363443a7 100644
--- a/google-cloud-bigtable-emulator-core/pom.xml
+++ b/google-cloud-bigtable-emulator-core/pom.xml
@@ -7,12 +7,12 @@
google-cloud-bigtable-parent
com.google.cloud
- 2.72.0
+ 2.73.0
Google Cloud Java - Bigtable Emulator Core
google-cloud-bigtable-emulator-core
- 0.209.0
+ 0.210.0
A Java wrapper for the Cloud Bigtable emulator.
diff --git a/google-cloud-bigtable-emulator/pom.xml b/google-cloud-bigtable-emulator/pom.xml
index abd173e85d..8937ceb1a5 100644
--- a/google-cloud-bigtable-emulator/pom.xml
+++ b/google-cloud-bigtable-emulator/pom.xml
@@ -5,7 +5,7 @@
4.0.0
google-cloud-bigtable-emulator
- 0.209.0
+ 0.210.0
Google Cloud Java - Bigtable Emulator
https://github.com/googleapis/java-bigtable
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-bigtable-parent
- 2.72.0
+ 2.73.0
scm:git:git@github.com:googleapis/java-bigtable.git
@@ -81,14 +81,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
import
@@ -99,7 +99,7 @@
com.google.cloud
google-cloud-bigtable-emulator-core
- 0.209.0
+ 0.210.0
diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml
index 10413f193c..9f1829889b 100644
--- a/google-cloud-bigtable/pom.xml
+++ b/google-cloud-bigtable/pom.xml
@@ -2,7 +2,7 @@
4.0.0
google-cloud-bigtable
- 2.72.0
+ 2.73.0
jar
Google Cloud Bigtable
https://github.com/googleapis/java-bigtable
@@ -12,11 +12,11 @@
com.google.cloud
google-cloud-bigtable-parent
- 2.72.0
+ 2.73.0
- 2.72.0
+ 2.73.0
google-cloud-bigtable
@@ -54,14 +54,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
import
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java
index b22d5a2565..371a745f34 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/Version.java
@@ -20,6 +20,6 @@
@InternalApi("For internal use only")
public final class Version {
// {x-version-update-start:google-cloud-bigtable:current}
- public static String VERSION = "2.72.0";
+ public static String VERSION = "2.73.0";
// {x-version-update-end}
}
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
index ddbe637e1e..0e5a4c9433 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java
@@ -1460,6 +1460,30 @@ public ApiFuture awaitReplicationAsync(final String tableId) {
return stub.awaitReplicationCallable().futureCall(tableName);
}
+ /**
+ * Polls an existing consistency token until table replication is consistent across all clusters.
+ * Useful for checking consistency of a token generated in a separate process. Blocks until
+ * completion.
+ *
+ * @param tableId The table to check.
+ * @param consistencyToken The token to poll.
+ */
+ public void waitForConsistency(String tableId, String consistencyToken) {
+ ApiExceptions.callAndTranslateApiException(waitForConsistencyAsync(tableId, consistencyToken));
+ }
+
+ /**
+ * Asynchronously polls the consistency token. Returns a future that completes when table
+ * replication is consistent across all clusters.
+ *
+ * @param tableId The table to check.
+ * @param consistencyToken The token to poll.
+ */
+ public ApiFuture waitForConsistencyAsync(String tableId, String consistencyToken) {
+ return stub.awaitConsistencyCallable()
+ .futureCall(ConsistencyRequest.forReplication(tableId, consistencyToken));
+ }
+
/**
* Creates a new authorized view with the specified configuration.
*
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java
index 0718af03c1..f338776503 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequest.java
@@ -23,7 +23,9 @@
import com.google.bigtable.admin.v2.StandardReadRemoteWrites;
import com.google.bigtable.admin.v2.TableName;
import com.google.cloud.bigtable.data.v2.internal.TableAdminRequestContext;
+import com.google.common.base.Preconditions;
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
@AutoValue
public abstract class ConsistencyRequest {
@@ -33,14 +35,36 @@ public abstract class ConsistencyRequest {
@Nonnull
protected abstract CheckConsistencyRequest.ModeCase getMode();
+ /**
+ * Internal accessor for the consistency token. Must be public to be accessible from the stub
+ * package.
+ */
+ @InternalApi
+ @Nullable
+ public abstract String getConsistencyToken();
+
public static ConsistencyRequest forReplication(String tableId) {
return new AutoValue_ConsistencyRequest(
- tableId, CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES);
+ tableId, CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES, null);
+ }
+
+ /**
+ * Creates a request to check consistency using an existing token.
+ *
+ * @param tableId The table ID.
+ * @param consistencyToken The token to check. Must not be null.
+ * @throws NullPointerException if consistencyToken is null.
+ */
+ public static ConsistencyRequest forReplication(String tableId, String consistencyToken) {
+ Preconditions.checkNotNull(consistencyToken, "consistencyToken must not be null");
+
+ return new AutoValue_ConsistencyRequest(
+ tableId, CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES, consistencyToken);
}
public static ConsistencyRequest forDataBoost(String tableId) {
return new AutoValue_ConsistencyRequest(
- tableId, CheckConsistencyRequest.ModeCase.DATA_BOOST_READ_LOCAL_WRITES);
+ tableId, CheckConsistencyRequest.ModeCase.DATA_BOOST_READ_LOCAL_WRITES, null);
}
@InternalApi
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java
index 7cdcb66599..395a77cdb3 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallable.java
@@ -93,6 +93,15 @@ static AwaitConsistencyCallable create(
@Override
public ApiFuture futureCall(
final ConsistencyRequest consistencyRequest, final ApiCallContext apiCallContext) {
+
+ // If the token is already provided, skip generation and poll directly.
+ if (consistencyRequest.getConsistencyToken() != null) {
+ CheckConsistencyRequest request =
+ consistencyRequest.toCheckConsistencyProto(
+ requestContext, consistencyRequest.getConsistencyToken());
+ return pollToken(request, apiCallContext);
+ }
+
ApiFuture tokenFuture =
generateToken(consistencyRequest.toGenerateTokenProto(requestContext), apiCallContext);
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
index 79cfee703a..cf8b65684e 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStub.java
@@ -21,7 +21,6 @@
import static com.google.cloud.bigtable.data.v2.stub.metrics.BuiltinMetricsConstants.INSTANCE_ID_KEY;
import com.google.api.core.ApiFuture;
-import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.batching.Batcher;
@@ -112,7 +111,6 @@
import com.google.cloud.bigtable.data.v2.stub.readrows.FilterMarkerRowsCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.LargeReadRowsResumptionStrategy;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor;
-import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsFirstCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsResumptionStrategy;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsRetryCompletedCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsUserCallable;
@@ -131,7 +129,6 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.ByteString;
import io.grpc.MethodDescriptor;
import io.opencensus.stats.Stats;
@@ -404,52 +401,31 @@ public ServerStreamingCallable createReadRowsCallable(
*/
public UnaryCallable createReadRowCallable(RowAdapter rowAdapter) {
ClientContext clientContext = bigtableClientContext.getClientContext();
- if (!settings.getEnableSkipTrailers()) {
- ServerStreamingCallable readRowsCallable =
- createReadRowsBaseCallable(
- ServerStreamingCallSettings.newBuilder()
- .setRetryableCodes(settings.readRowSettings().getRetryableCodes())
- .setRetrySettings(settings.readRowSettings().getRetrySettings())
- .setIdleTimeout(settings.readRowSettings().getRetrySettings().getTotalTimeout())
- .build(),
- rowAdapter);
-
- ReadRowsUserCallable readRowCallable =
- new ReadRowsUserCallable<>(readRowsCallable, requestContext);
- ReadRowsFirstCallable firstRow = new ReadRowsFirstCallable<>(readRowCallable);
- UnaryCallable traced =
- new TracedUnaryCallable<>(
- firstRow, clientContext.getTracerFactory(), getSpanName("ReadRow"));
- return traced.withDefaultCallContext(
- clientContext
- .getDefaultCallContext()
- .withRetrySettings(settings.readRowSettings().getRetrySettings()));
- } else {
- ServerStreamingCallable readRowsCallable =
- createReadRowsBaseCallable(
- ServerStreamingCallSettings.newBuilder()
- .setRetryableCodes(settings.readRowSettings().getRetryableCodes())
- .setRetrySettings(settings.readRowSettings().getRetrySettings())
- .setIdleTimeoutDuration(Duration.ZERO)
- .setWaitTimeoutDuration(Duration.ZERO)
- .build(),
- rowAdapter,
- new SimpleStreamResumptionStrategy<>());
- ServerStreamingCallable readRowCallable =
- new TransformingServerStreamingCallable<>(
- readRowsCallable,
- (query) -> query.limit(1).toProto(requestContext),
- Functions.identity());
-
- return new BigtableUnaryOperationCallable<>(
- readRowCallable,
- clientContext
- .getDefaultCallContext()
- .withRetrySettings(settings.readRowSettings().getRetrySettings()),
- clientContext.getTracerFactory(),
- getSpanName("ReadRow"),
- /* allowNoResponses= */ true);
- }
+
+ ServerStreamingCallable readRowsCallable =
+ createReadRowsBaseCallable(
+ ServerStreamingCallSettings.newBuilder()
+ .setRetryableCodes(settings.readRowSettings().getRetryableCodes())
+ .setRetrySettings(settings.readRowSettings().getRetrySettings())
+ .setIdleTimeoutDuration(Duration.ZERO)
+ .setWaitTimeoutDuration(Duration.ZERO)
+ .build(),
+ rowAdapter,
+ new SimpleStreamResumptionStrategy<>());
+ ServerStreamingCallable readRowCallable =
+ new TransformingServerStreamingCallable<>(
+ readRowsCallable,
+ (query) -> query.limit(1).toProto(requestContext),
+ Functions.identity());
+
+ return new BigtableUnaryOperationCallable<>(
+ readRowCallable,
+ clientContext
+ .getDefaultCallContext()
+ .withRetrySettings(settings.readRowSettings().getRetrySettings()),
+ clientContext.getTracerFactory(),
+ getSpanName("ReadRow"),
+ /* allowNoResponses= */ true);
}
private ServerStreamingCallable createReadRowsBaseCallable(
@@ -1292,67 +1268,6 @@ private UnaryCallable createUnar
UnaryCallSettings callSettings,
Function requestTransformer,
Function responseTranformer) {
- if (settings.getEnableSkipTrailers()) {
- return createUnaryCallableNew(
- methodDescriptor, headerParamsFn, callSettings, requestTransformer, responseTranformer);
- } else {
- return createUnaryCallableOld(
- methodDescriptor, headerParamsFn, callSettings, requestTransformer, responseTranformer);
- }
- }
-
- private UnaryCallable createUnaryCallableOld(
- MethodDescriptor methodDescriptor,
- RequestParamsExtractor headerParamsFn,
- UnaryCallSettings callSettings,
- Function requestTransformer,
- Function responseTranformer) {
-
- UnaryCallable base =
- GrpcRawCallableFactory.createUnaryCallable(
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(methodDescriptor)
- .setParamsExtractor(headerParamsFn)
- .build(),
- callSettings.getRetryableCodes());
-
- UnaryCallable withStatsHeaders = new StatsHeadersUnaryCallable<>(base);
-
- UnaryCallable withBigtableTracer =
- new BigtableTracerUnaryCallable<>(withStatsHeaders);
-
- UnaryCallable retrying = withRetries(withBigtableTracer, callSettings);
-
- UnaryCallable transformed =
- new UnaryCallable() {
- @Override
- public ApiFuture futureCall(ReqT reqT, ApiCallContext apiCallContext) {
- ApiFuture f =
- retrying.futureCall(requestTransformer.apply(reqT), apiCallContext);
- return ApiFutures.transform(
- f, responseTranformer::apply, MoreExecutors.directExecutor());
- }
- };
-
- UnaryCallable traced =
- new TracedUnaryCallable<>(
- transformed,
- bigtableClientContext.getClientContext().getTracerFactory(),
- getSpanName(methodDescriptor.getBareMethodName()));
-
- return traced.withDefaultCallContext(
- bigtableClientContext
- .getClientContext()
- .getDefaultCallContext()
- .withRetrySettings(callSettings.getRetrySettings()));
- }
-
- private UnaryCallable createUnaryCallableNew(
- MethodDescriptor methodDescriptor,
- RequestParamsExtractor headerParamsFn,
- UnaryCallSettings callSettings,
- Function requestTransformer,
- Function responseTranformer) {
ServerStreamingCallable base =
GrpcRawCallableFactory.createServerStreamingCallable(
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
index acd3323957..d1fe259ea1 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettings.java
@@ -67,7 +67,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ScheduledExecutorService;
import java.util.logging.Logger;
@@ -119,11 +118,6 @@ public class EnhancedBigtableStubSettings extends StubSettings IDEMPOTENT_RETRY_CODES =
ImmutableSet.of(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE);
@@ -268,7 +262,6 @@ public class EnhancedBigtableStubSettings extends StubSettings primedTableIds;
private final boolean enableRoutingCookie;
private final boolean enableRetryInfo;
- private final boolean enableSkipTrailers;
private final ServerStreamingCallSettings readRowsSettings;
private final UnaryCallSettings readRowSettings;
@@ -318,7 +311,6 @@ private EnhancedBigtableStubSettings(Builder builder) {
primedTableIds = builder.primedTableIds;
enableRoutingCookie = builder.enableRoutingCookie;
enableRetryInfo = builder.enableRetryInfo;
- enableSkipTrailers = builder.enableSkipTrailers;
metricsProvider = builder.metricsProvider;
metricsEndpoint = builder.metricsEndpoint;
internalMetricsProvider = builder.internalMetricsProvider;
@@ -413,10 +405,6 @@ public boolean getEnableRetryInfo() {
return enableRetryInfo;
}
- boolean getEnableSkipTrailers() {
- return enableSkipTrailers;
- }
-
/**
* Gets the Google Cloud Monitoring endpoint for publishing client side metrics. If it's null,
* client will publish metrics to the default monitoring endpoint.
@@ -769,7 +757,6 @@ public static class Builder extends StubSettings.Builder readRowsSettings;
private final UnaryCallSettings.Builder readRowSettings;
@@ -810,7 +797,6 @@ private Builder() {
setCredentialsProvider(defaultCredentialsProviderBuilder().build());
this.enableRoutingCookie = true;
this.enableRetryInfo = true;
- this.enableSkipTrailers = SKIP_TRAILERS;
metricsProvider = DefaultMetricsProvider.INSTANCE;
this.internalMetricsProvider = DEFAULT_INTERNAL_OTEL_PROVIDER;
this.jwtAudience = DEFAULT_DATA_JWT_AUDIENCE;
@@ -1223,11 +1209,6 @@ public boolean getEnableRetryInfo() {
return enableRetryInfo;
}
- Builder setEnableSkipTrailers(boolean enabled) {
- this.enableSkipTrailers = enabled;
- return this;
- }
-
/** Returns the builder for the settings used for calls to readRows. */
public ServerStreamingCallSettings.Builder readRowsSettings() {
return readRowsSettings;
@@ -1360,7 +1341,6 @@ public String toString() {
.add("primedTableIds", primedTableIds)
.add("enableRoutingCookie", enableRoutingCookie)
.add("enableRetryInfo", enableRetryInfo)
- .add("enableSkipTrailers", enableSkipTrailers)
.add("readRowsSettings", readRowsSettings)
.add("readRowSettings", readRowSettings)
.add("sampleRowKeysSettings", sampleRowKeysSettings)
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallable.java
deleted file mode 100644
index 2ef26605b4..0000000000
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallable.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.bigtable.data.v2.stub.readrows;
-
-import com.google.api.core.ApiFuture;
-import com.google.api.core.InternalApi;
-import com.google.api.core.SettableApiFuture;
-import com.google.api.gax.rpc.ApiCallContext;
-import com.google.api.gax.rpc.ServerStreamingCallable;
-import com.google.api.gax.rpc.StateCheckingResponseObserver;
-import com.google.api.gax.rpc.StreamController;
-import com.google.api.gax.rpc.UnaryCallable;
-import com.google.cloud.bigtable.data.v2.models.Query;
-
-/**
- * Enhancement for `readRowsCallable().first()` to gracefully limit the row count instead of
- * cancelling the RPC
- */
-@InternalApi
-public class ReadRowsFirstCallable extends UnaryCallable {
-
- private final ServerStreamingCallable inner;
-
- public ReadRowsFirstCallable(ServerStreamingCallable inner) {
- this.inner = inner;
- }
-
- @Override
- public ApiFuture futureCall(Query query, ApiCallContext context) {
- ReadRowsFirstResponseObserver observer = new ReadRowsFirstResponseObserver<>();
- this.inner.call(query.limit(1), observer, context);
- return observer.getFuture();
- }
-
- private class ReadRowsFirstResponseObserver extends StateCheckingResponseObserver {
- private StreamController innerController;
- private RowT firstRow;
- private SettableApiFuture settableFuture = SettableApiFuture.create();
-
- @Override
- protected void onStartImpl(StreamController streamController) {
- this.innerController = streamController;
- }
-
- @Override
- protected void onResponseImpl(RowT response) {
- if (firstRow == null) {
- this.firstRow = response;
- }
- }
-
- @Override
- protected void onErrorImpl(Throwable throwable) {
- settableFuture.setException(throwable);
- }
-
- @Override
- protected void onCompleteImpl() {
- settableFuture.set(firstRow);
- }
-
- protected ApiFuture getFuture() {
- return settableFuture;
- }
- }
-}
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java
index 0bf3731161..e89bd8fbb5 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java
@@ -1657,6 +1657,31 @@ public void testTestIamPermissions() {
assertThat(actualResult).containsExactly("bigtable.backups.get");
}
+ @Test
+ public void testWaitForConsistencyWithToken() {
+ // Setup
+ Mockito.when(mockStub.awaitConsistencyCallable()).thenReturn(mockAwaitConsistencyCallable);
+
+ String token = "my-token";
+ ConsistencyRequest expectedRequest = ConsistencyRequest.forReplication(TABLE_ID, token);
+
+ final AtomicBoolean wasCalled = new AtomicBoolean(false);
+
+ Mockito.when(mockAwaitConsistencyCallable.futureCall(expectedRequest))
+ .thenAnswer(
+ (Answer>)
+ invocationOnMock -> {
+ wasCalled.set(true);
+ return ApiFutures.immediateFuture(null);
+ });
+
+ // Execute
+ adminClient.waitForConsistency(TABLE_ID, token);
+
+ // Verify
+ assertThat(wasCalled.get()).isTrue();
+ }
+
private void mockOperationResult(
OperationCallable callable,
ReqT request,
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java
index d9e40242a1..c3b99a4e68 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/models/ConsistencyRequestTest.java
@@ -79,4 +79,22 @@ public void testToGenerateTokenProto() {
assertThat(generateRequest.getName())
.isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID));
}
+
+ @Test
+ public void testToCheckConsistencyProtoWithToken() {
+ ConsistencyRequest consistencyRequest =
+ ConsistencyRequest.forReplication(TABLE_ID, CONSISTENCY_TOKEN);
+
+ TableAdminRequestContext requestContext =
+ TableAdminRequestContext.create(PROJECT_ID, INSTANCE_ID);
+
+ CheckConsistencyRequest checkConsistencyRequest =
+ consistencyRequest.toCheckConsistencyProto(requestContext, CONSISTENCY_TOKEN);
+
+ assertThat(checkConsistencyRequest.getName())
+ .isEqualTo(NameUtil.formatTableName(PROJECT_ID, INSTANCE_ID, TABLE_ID));
+ assertThat(checkConsistencyRequest.getConsistencyToken()).isEqualTo(CONSISTENCY_TOKEN);
+ assertThat(checkConsistencyRequest.getModeCase())
+ .isEqualTo(CheckConsistencyRequest.ModeCase.STANDARD_READ_REMOTE_WRITES);
+ }
}
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java
index 2628cdf224..0aad99b232 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/stub/AwaitConsistencyCallableTest.java
@@ -42,6 +42,7 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import org.mockito.ArgumentMatchers;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnit;
@@ -325,4 +326,37 @@ public void testAwaitReplicationCallablePolling() throws Exception {
consistentFuture.get(1, TimeUnit.SECONDS);
}
+
+ @Test
+ public void testWithProvidedToken() throws Exception {
+ // 1. Setup: Request with a pre-existing token
+ String existingToken = "existing-token";
+ ConsistencyRequest consistencyRequest =
+ ConsistencyRequest.forReplication(TABLE_ID, existingToken);
+
+ // 2. Setup: Mock the check operation to succeed immediately
+ CheckConsistencyRequest expectedCheckRequest =
+ CheckConsistencyRequest.newBuilder()
+ .setName(TABLE_NAME.toString())
+ .setConsistencyToken(existingToken)
+ .setStandardReadRemoteWrites(StandardReadRemoteWrites.newBuilder().build())
+ .build();
+ CheckConsistencyResponse expectedResponse =
+ CheckConsistencyResponse.newBuilder().setConsistent(true).build();
+
+ Mockito.when(mockCheckConsistencyCallable.futureCall(expectedCheckRequest, CALL_CONTEXT))
+ .thenReturn(ApiFutures.immediateFuture(expectedResponse));
+
+ // 3. Execute
+ ApiFuture future = awaitConsistencyCallable.futureCall(consistencyRequest, CALL_CONTEXT);
+ future.get(1, TimeUnit.SECONDS);
+
+ // 4. Verify: Generate was NEVER called, Check WAS called
+ Mockito.verify(mockGenerateConsistencyTokenCallable, Mockito.never())
+ .futureCall(
+ ArgumentMatchers.any(GenerateConsistencyTokenRequest.class),
+ ArgumentMatchers.any(ApiCallContext.class));
+ Mockito.verify(mockCheckConsistencyCallable, Mockito.times(1))
+ .futureCall(expectedCheckRequest, CALL_CONTEXT);
+ }
}
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java
index 888dbc0f34..aecad0cc12 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubSettingsTest.java
@@ -995,7 +995,6 @@ public void enableRetryInfoFalseValueTest() throws IOException {
"primedTableIds",
"enableRoutingCookie",
"enableRetryInfo",
- "enableSkipTrailers",
"readRowsSettings",
"readRowSettings",
"sampleRowKeysSettings",
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java
index aba814b05d..fbafe50f47 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/EnhancedBigtableStubTest.java
@@ -110,6 +110,7 @@
import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
import io.grpc.Metadata.Key;
+import io.grpc.MethodDescriptor;
import io.grpc.Server;
import io.grpc.ServerCall;
import io.grpc.ServerCall.Listener;
@@ -717,7 +718,7 @@ public void testCallContextPropagatedInMutationBatcher()
}
// Ensure that the server got the overriden deadline
- Context serverCtx = contextInterceptor.contexts.poll();
+ Context serverCtx = contextInterceptor.pollContext(BigtableGrpc.getMutateRowsMethod());
assertThat(serverCtx).isNotNull();
assertThat(serverCtx.getDeadline()).isAtLeast(Deadline.after(8, TimeUnit.MINUTES));
}
@@ -747,7 +748,7 @@ public void testCallContextPropagatedInReadBatcher()
}
// Ensure that the server got the overriden deadline
- Context serverCtx = contextInterceptor.contexts.poll();
+ Context serverCtx = contextInterceptor.pollContext(BigtableGrpc.getReadRowsMethod());
assertThat(serverCtx).isNotNull();
assertThat(serverCtx.getDeadline()).isAtLeast(Deadline.after(8, TimeUnit.MINUTES));
}
@@ -970,16 +971,37 @@ public Listener interceptCall(
}
private static class ContextInterceptor implements ServerInterceptor {
- final BlockingQueue contexts = Queues.newLinkedBlockingDeque();
+ final BlockingQueue contexts = Queues.newLinkedBlockingDeque();
+
+ static class MethodContext {
+ final MethodDescriptor, ?> method;
+ final Context context;
+
+ MethodContext(MethodDescriptor, ?> method, Context context) {
+ this.method = method;
+ this.context = context;
+ }
+ }
@Override
public Listener interceptCall(
ServerCall serverCall,
Metadata metadata,
ServerCallHandler serverCallHandler) {
- contexts.add(Context.current());
+ contexts.add(new MethodContext(serverCall.getMethodDescriptor(), Context.current()));
return serverCallHandler.startCall(serverCall, metadata);
}
+
+ Context pollContext(MethodDescriptor, ?> method) {
+ ContextInterceptor.MethodContext methodContext = contexts.poll();
+ while (methodContext != null) {
+ if (method.equals(methodContext.method)) {
+ return methodContext.context;
+ }
+ methodContext = contexts.poll();
+ }
+ return null;
+ }
}
private static class FakeDataService extends BigtableGrpc.BigtableImplBase {
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java
index b05abca34e..9759f798c4 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/SkipTrailersTest.java
@@ -102,7 +102,7 @@ public void setUp() throws Exception {
.setInstanceId(INSTANCE_ID)
.setMetricsProvider(NoopMetricsProvider.INSTANCE)
.setCredentialsProvider(NoCredentialsProvider.create());
- clientBuilder.stubSettings().setEnableSkipTrailers(true).setTracerFactory(tracerFactory);
+ clientBuilder.stubSettings().setTracerFactory(tracerFactory);
client = BigtableDataClient.create(clientBuilder.build());
}
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java
index 864a801e6e..df63ff8019 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java
@@ -79,9 +79,16 @@
import com.google.protobuf.ByteString;
import com.google.protobuf.BytesValue;
import com.google.protobuf.StringValue;
+import io.grpc.CallOptions;
+import io.grpc.Channel;
+import io.grpc.ClientCall;
+import io.grpc.ClientInterceptor;
+import io.grpc.ForwardingClientCall;
+import io.grpc.ForwardingClientCallListener;
import io.grpc.ForwardingServerCall;
import io.grpc.ManagedChannelBuilder;
import io.grpc.Metadata;
+import io.grpc.MethodDescriptor;
import io.grpc.ProxiedSocketAddress;
import io.grpc.ProxyDetector;
import io.grpc.Server;
@@ -160,6 +167,8 @@ public class BuiltinMetricsTracerTest {
private DelayProxyDetector delayProxyDetector;
+ private final OutstandingRpcCounter outstandingRpcCounter = new OutstandingRpcCounter();
+
@Before
public void setUp() throws Exception {
metricReader = InMemoryMetricReader.create();
@@ -272,7 +281,7 @@ public void sendHeaders(Metadata headers) {
if (oldConfigurator != null) {
builder = oldConfigurator.apply(builder);
}
- return builder.proxyDetector(delayProxyDetector);
+ return builder.proxyDetector(delayProxyDetector).intercept(outstandingRpcCounter);
});
stubSettingsBuilder.setTransportChannelProvider(channelProvider.build());
EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build();
@@ -541,10 +550,11 @@ public void testRetryCount() throws InterruptedException {
}
@Test
- public void testMutateRowAttemptsTagValues() {
+ public void testMutateRowAttemptsTagValues() throws InterruptedException {
stub.mutateRowCallable()
.call(RowMutation.create(TABLE, "random-row").setCell("cf", "q", "value"));
+ outstandingRpcCounter.waitUntilRpcsDone();
MetricData metricData = getMetricData(metricReader, ATTEMPT_LATENCIES_NAME);
Attributes expected1 =
@@ -724,6 +734,7 @@ public void testQueuedOnChannelUnaryLatencies() throws Exception {
Duration proxyDelayPriorTest = delayProxyDetector.getCurrentDelayUsed();
f.get();
+ outstandingRpcCounter.waitUntilRpcsDone();
MetricData clientLatency = getMetricData(metricReader, CLIENT_BLOCKING_LATENCIES_NAME);
Attributes attributes =
@@ -1123,6 +1134,46 @@ public AtomicInteger getResponseCounter() {
}
}
+ static class OutstandingRpcCounter implements ClientInterceptor {
+ private int numOutstandingRpcs = 0;
+ private final Object lock = new Object();
+
+ @Override
+ public ClientCall interceptCall(
+ MethodDescriptor methodDescriptor, CallOptions callOptions, Channel channel) {
+ synchronized (lock) {
+ numOutstandingRpcs++;
+ }
+ return new ForwardingClientCall.SimpleForwardingClientCall(
+ channel.newCall(methodDescriptor, callOptions)) {
+ @Override
+ public void start(Listener responseListener, Metadata headers) {
+ super.start(
+ new ForwardingClientCallListener.SimpleForwardingClientCallListener(
+ responseListener) {
+ @Override
+ public void onClose(Status status, Metadata trailers) {
+ super.onClose(status, trailers);
+ synchronized (lock) {
+ numOutstandingRpcs--;
+ lock.notify();
+ }
+ }
+ },
+ headers);
+ }
+ };
+ }
+
+ void waitUntilRpcsDone() throws InterruptedException {
+ synchronized (lock) {
+ while (numOutstandingRpcs > 0) {
+ lock.wait();
+ }
+ }
+ }
+ }
+
class DelayProxyDetector implements ProxyDetector {
private volatile Instant lastProxyDelay = null;
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java
deleted file mode 100644
index 07cf3478c1..0000000000
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/readrows/ReadRowsFirstCallableTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2018 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.bigtable.data.v2.stub.readrows;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.verify;
-
-import com.google.api.gax.grpc.GrpcCallContext;
-import com.google.api.gax.rpc.ApiCallContext;
-import com.google.api.gax.rpc.ResponseObserver;
-import com.google.api.gax.rpc.ServerStreamingCallable;
-import com.google.cloud.bigtable.data.v2.internal.RequestContext;
-import com.google.cloud.bigtable.data.v2.models.Query;
-import com.google.cloud.bigtable.data.v2.models.Row;
-import com.google.common.truth.Truth;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import org.mockito.junit.MockitoJUnit;
-import org.mockito.junit.MockitoRule;
-import org.mockito.quality.Strictness;
-
-@RunWith(JUnit4.class)
-public class ReadRowsFirstCallableTest {
- @Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN);
-
- private static final RequestContext REQUEST_CONTEXT =
- RequestContext.create("fake-project", "fake-instance", "fake-profile");
-
- private ServerStreamingCallable innerCallable;
- private ArgumentCaptor innerQuery;
-
- @SuppressWarnings("unchecked")
- @Before
- public void setUp() {
- innerCallable = Mockito.mock(ServerStreamingCallable.class);
- innerQuery = ArgumentCaptor.forClass(Query.class);
- }
-
- @Test
- public void testLimitAdded() {
- ReadRowsFirstCallable callable = new ReadRowsFirstCallable<>(innerCallable);
- callable.futureCall(Query.create("fake-table"), GrpcCallContext.createDefault());
- verify(innerCallable)
- .call(innerQuery.capture(), any(ResponseObserver.class), any(ApiCallContext.class));
- Truth.assertThat(innerQuery.getValue().toProto(REQUEST_CONTEXT))
- .isEqualTo(Query.create("fake-table").limit(1).toProto(REQUEST_CONTEXT));
- }
-
- @Test
- public void testLimitChanged() {
- ReadRowsFirstCallable callable = new ReadRowsFirstCallable<>(innerCallable);
- callable.futureCall(Query.create("fake-table").limit(10), GrpcCallContext.createDefault());
- verify(innerCallable)
- .call(innerQuery.capture(), any(ResponseObserver.class), any(ApiCallContext.class));
- Truth.assertThat(innerQuery.getValue().toProto(REQUEST_CONTEXT))
- .isEqualTo(Query.create("fake-table").limit(1).toProto(REQUEST_CONTEXT));
- }
-}
diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml
index 3b862ca1ca..0e04f8e2d5 100644
--- a/grpc-google-cloud-bigtable-admin-v2/pom.xml
+++ b/grpc-google-cloud-bigtable-admin-v2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigtable-admin-v2
- 2.72.0
+ 2.73.0
grpc-google-cloud-bigtable-admin-v2
GRPC library for grpc-google-cloud-bigtable-admin-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.72.0
+ 2.73.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
import
diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml
index 248f4fb435..a4b2ba3448 100644
--- a/grpc-google-cloud-bigtable-v2/pom.xml
+++ b/grpc-google-cloud-bigtable-v2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-bigtable-v2
- 2.72.0
+ 2.73.0
grpc-google-cloud-bigtable-v2
GRPC library for grpc-google-cloud-bigtable-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.72.0
+ 2.73.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
import
diff --git a/pom.xml b/pom.xml
index 092cfd562f..37e71b4105 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
google-cloud-bigtable-parent
pom
- 2.72.0
+ 2.73.0
Google Cloud Bigtable Parent
https://github.com/googleapis/java-bigtable
@@ -14,7 +14,7 @@
com.google.cloud
sdk-platform-java-config
- 3.56.0
+ 3.56.1
@@ -156,27 +156,27 @@
com.google.api.grpc
proto-google-cloud-bigtable-v2
- 2.72.0
+ 2.73.0
com.google.api.grpc
proto-google-cloud-bigtable-admin-v2
- 2.72.0
+ 2.73.0
com.google.api.grpc
grpc-google-cloud-bigtable-v2
- 2.72.0
+ 2.73.0
com.google.api.grpc
grpc-google-cloud-bigtable-admin-v2
- 2.72.0
+ 2.73.0
com.google.cloud
google-cloud-bigtable
- 2.72.0
+ 2.73.0
diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml
index 3e04ac4312..43adc79cd7 100644
--- a/proto-google-cloud-bigtable-admin-v2/pom.xml
+++ b/proto-google-cloud-bigtable-admin-v2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigtable-admin-v2
- 2.72.0
+ 2.73.0
proto-google-cloud-bigtable-admin-v2
PROTO library for proto-google-cloud-bigtable-admin-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.72.0
+ 2.73.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
import
diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml
index 4ae3e91c09..9a78c6c9c7 100644
--- a/proto-google-cloud-bigtable-v2/pom.xml
+++ b/proto-google-cloud-bigtable-v2/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-bigtable-v2
- 2.72.0
+ 2.73.0
proto-google-cloud-bigtable-v2
PROTO library for proto-google-cloud-bigtable-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.72.0
+ 2.73.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.72.0
+ 2.73.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.72.0
+ 2.73.0
pom
import
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 5442a31b72..1986396f29 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-bigtable
- 2.72.0
+ 2.73.0
diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml
index 7c65440faf..97a6e687ec 100644
--- a/test-proxy/pom.xml
+++ b/test-proxy/pom.xml
@@ -12,11 +12,11 @@
google-cloud-bigtable-parent
com.google.cloud
- 2.72.0
+ 2.73.0
- 2.72.0
+ 2.73.0
diff --git a/versions.txt b/versions.txt
index 8e1fd5cc35..fc4fe30957 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,10 +1,10 @@
# Format:
# module:released-version:current-version
-google-cloud-bigtable:2.72.0:2.72.0
-grpc-google-cloud-bigtable-admin-v2:2.72.0:2.72.0
-grpc-google-cloud-bigtable-v2:2.72.0:2.72.0
-proto-google-cloud-bigtable-admin-v2:2.72.0:2.72.0
-proto-google-cloud-bigtable-v2:2.72.0:2.72.0
-google-cloud-bigtable-emulator:0.209.0:0.209.0
-google-cloud-bigtable-emulator-core:0.209.0:0.209.0
+google-cloud-bigtable:2.73.0:2.73.0
+grpc-google-cloud-bigtable-admin-v2:2.73.0:2.73.0
+grpc-google-cloud-bigtable-v2:2.73.0:2.73.0
+proto-google-cloud-bigtable-admin-v2:2.73.0:2.73.0
+proto-google-cloud-bigtable-v2:2.73.0:2.73.0
+google-cloud-bigtable-emulator:0.210.0:0.210.0
+google-cloud-bigtable-emulator-core:0.210.0:0.210.0