- 2.21.0
+ 2.22.0
google-cloud-bigtable
@@ -47,14 +47,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.21.0
+ 2.22.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.21.0
+ 2.22.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 0aedf1e646..3643c970e9 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.21.0";
+ public static String VERSION = "2.22.0";
// {x-version-update-end}
}
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java
index 8579c0e4cd..a887097485 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/BigtableDataSettings.java
@@ -16,6 +16,7 @@
package com.google.cloud.bigtable.data.v2;
import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
import com.google.api.gax.batching.Batcher;
import com.google.api.gax.batching.FlowController;
import com.google.api.gax.core.CredentialsProvider;
@@ -278,6 +279,15 @@ public Long getBatchMutationsTargetRpcLatencyMs() {
return stubSettings.bulkMutateRowsSettings().getTargetRpcLatencyMs();
}
+ /**
+ * Gets if flow control is enabled for {@link BigtableDataClient#newBulkMutationBatcher(String)}
+ * based on the load of the Bigtable server.
+ */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public boolean isBulkMutationFlowControlEnabled() {
+ return stubSettings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled();
+ }
+
/** Returns the underlying RPC settings. */
public EnhancedBigtableStubSettings getStubSettings() {
return stubSettings;
@@ -505,6 +515,28 @@ public Long getTargetRpcLatencyMsForBatchMutation() {
return stubSettings.bulkMutateRowsSettings().getTargetRpcLatencyMs();
}
+ /**
+ * Configure flow control for {@link BigtableDataClient#newBulkMutationBatcher(String)} based on
+ * the current load on the Bigtable cluster.
+ *
+ * This is different from the {@link FlowController} that's always enabled on batch reads and
+ * batch writes, which limits the number of outstanding requests to the Bigtable server.
+ */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public Builder setBulkMutationFlowControl(boolean isEnableFlowControl) {
+ stubSettings.bulkMutateRowsSettings().setServerInitiatedFlowControl(isEnableFlowControl);
+ return this;
+ }
+
+ /**
+ * Gets if flow control is enabled for {@link BigtableDataClient#newBulkMutationBatcher(String)}
+ * based on the load of the Bigtable server.
+ */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public boolean isBulkMutationFlowControlEnabled() {
+ return stubSettings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled();
+ }
+
/**
* Returns the underlying settings for making RPC calls. The settings should be changed with
* care.
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java
index 09e657ac07..21f837f87f 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettings.java
@@ -16,6 +16,7 @@
package com.google.cloud.bigtable.data.v2.stub;
import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
import com.google.api.gax.batching.BatchingCallSettings;
import com.google.api.gax.batching.BatchingDescriptor;
import com.google.api.gax.batching.BatchingSettings;
@@ -66,6 +67,8 @@ public final class BigtableBatchingCallSettings extends UnaryCallSettings batchingDescriptor) {
return new Builder(batchingDescriptor);
@@ -130,6 +140,7 @@ public String toString() {
.add("isLatencyBasedThrottlingEnabled", isLatencyBasedThrottlingEnabled)
.add("targetRpcLatency", targetRpcLatencyMs)
.add("dynamicFlowControlSettings", dynamicFlowControlSettings)
+ .add("isServerInitiatedFlowControlEnabled", isServerInitiatedFlowControlEnabled)
.toString();
}
@@ -145,6 +156,8 @@ public static class Builder extends UnaryCallSettings.Builder batchingDescriptor) {
@@ -159,6 +172,7 @@ private Builder(@Nonnull BigtableBatchingCallSettings settings) {
this.isLatencyBasedThrottlingEnabled = settings.isLatencyBasedThrottlingEnabled();
this.targetRpcLatencyMs = settings.getTargetRpcLatencyMs();
this.dynamicFlowControlSettings = settings.getDynamicFlowControlSettings();
+ this.isServerInitiatedFlowControlEnabled = settings.isServerInitiatedFlowControlEnabled();
}
/** Sets the batching settings with various thresholds. */
@@ -263,6 +277,19 @@ DynamicFlowControlSettings getDynamicFlowControlSettings() {
return this.dynamicFlowControlSettings;
}
+ /** Configure flow control based on the current load of the Bigtable server. */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public Builder setServerInitiatedFlowControl(boolean isEnable) {
+ this.isServerInitiatedFlowControlEnabled = isEnable;
+ return this;
+ }
+
+ /** Gets if flow control is enabled based on the load of the Bigtable server. */
+ @InternalApi("Intended for use by the Bigtable dataflow connectors only")
+ public boolean isServerInitiatedFlowControlEnabled() {
+ return this.isServerInitiatedFlowControlEnabled;
+ }
+
/** Builds the {@link BigtableBatchingCallSettings} object with provided configuration. */
@Override
public BigtableBatchingCallSettings build() {
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 820dc7c652..c46539cddf 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
@@ -733,15 +733,19 @@ public Map extract(MutateRowsRequest mutateRowsRequest) {
.build(),
settings.bulkMutateRowsSettings().getRetryableCodes());
- ServerStreamingCallable withStatsHeaders =
+ ServerStreamingCallable callable =
new StatsHeadersServerStreamingCallable<>(base);
+ if (settings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled()) {
+ callable = new RateLimitingServerStreamingCallable(callable);
+ }
+
// Sometimes MutateRows connections are disconnected via an RST frame. This error is transient
// and
// should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code
// which by default is not retryable. Convert the exception so it can be retried in the client.
ServerStreamingCallable convertException =
- new ConvertExceptionCallable<>(withStatsHeaders);
+ new ConvertExceptionCallable<>(callable);
RetryAlgorithm retryAlgorithm =
new RetryAlgorithm<>(
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 b6dd063cb6..bee6eb1694 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
@@ -32,6 +32,7 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.auth.Credentials;
+import com.google.bigtable.v2.FeatureFlags;
import com.google.bigtable.v2.PingAndWarmRequest;
import com.google.cloud.bigtable.Version;
import com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord;
@@ -50,7 +51,10 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -221,6 +225,8 @@ public class EnhancedBigtableStubSettings extends StubSettings pingAndWarmSettings;
+ private final FeatureFlags featureFlags;
+
private EnhancedBigtableStubSettings(Builder builder) {
super(builder);
@@ -259,6 +265,7 @@ private EnhancedBigtableStubSettings(Builder builder) {
builder.generateInitialChangeStreamPartitionsSettings.build();
readChangeStreamSettings = builder.readChangeStreamSettings.build();
pingAndWarmSettings = builder.pingAndWarmSettings.build();
+ featureFlags = builder.featureFlags.build();
}
/** Create a new builder. */
@@ -598,6 +605,8 @@ public static class Builder extends StubSettings.Builder pingAndWarmSettings;
+ private FeatureFlags.Builder featureFlags;
+
/**
* Initializes a new Builder with sane defaults for all settings.
*
@@ -621,16 +630,6 @@ private Builder() {
setStreamWatchdogCheckInterval(baseDefaults.getStreamWatchdogCheckInterval());
setStreamWatchdogProvider(baseDefaults.getStreamWatchdogProvider());
- // Inject the UserAgent in addition to api-client header
- Map headers =
- ImmutableMap.builder()
- .putAll(
- BigtableStubSettings.defaultApiClientHeaderProviderBuilder().build().getHeaders())
- // GrpcHeaderInterceptor treats the `user-agent` as a magic string
- .put("user-agent", "bigtable-java/" + Version.VERSION)
- .build();
- setInternalHeaderProvider(FixedHeaderProvider.create(headers));
-
// Per-method settings using baseSettings for defaults.
readRowsSettings = ServerStreamingCallSettings.newBuilder();
@@ -729,6 +728,8 @@ private Builder() {
.setMaxRpcTimeout(PRIME_REQUEST_TIMEOUT)
.setTotalTimeout(PRIME_REQUEST_TIMEOUT)
.build());
+
+ featureFlags = FeatureFlags.newBuilder();
}
private Builder(EnhancedBigtableStubSettings settings) {
@@ -753,6 +754,7 @@ private Builder(EnhancedBigtableStubSettings settings) {
settings.generateInitialChangeStreamPartitionsSettings.toBuilder();
readChangeStreamSettings = settings.readChangeStreamSettings.toBuilder();
pingAndWarmSettings = settings.pingAndWarmSettings.toBuilder();
+ featureFlags = settings.featureFlags.toBuilder();
}
//
@@ -970,6 +972,34 @@ public EnhancedBigtableStubSettings build() {
BigtableChannelPrimer.create(credentials, projectId, instanceId, appProfileId));
this.setTransportChannelProvider(channelProviderBuilder.build());
}
+
+ if (this.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled()) {
+ // only set mutate rows feature flag when this feature is enabled
+ featureFlags.setMutateRowsRateLimit(true);
+ }
+
+ // Serialize the web64 encode the bigtable feature flags
+ ByteArrayOutputStream boas = new ByteArrayOutputStream();
+ try {
+ featureFlags.build().writeTo(boas);
+ } catch (IOException e) {
+ throw new IllegalStateException(
+ "Unexpected IOException while serializing feature flags", e);
+ }
+ byte[] serializedFlags = boas.toByteArray();
+ byte[] encodedFlags = Base64.getUrlEncoder().encode(serializedFlags);
+
+ // Inject the UserAgent in addition to api-client header
+ Map headers =
+ ImmutableMap.builder()
+ .putAll(
+ BigtableStubSettings.defaultApiClientHeaderProviderBuilder().build().getHeaders())
+ // GrpcHeaderInterceptor treats the `user-agent` as a magic string
+ .put("user-agent", "bigtable-java/" + Version.VERSION)
+ .put("bigtable-features", new String(encodedFlags, StandardCharsets.UTF_8))
+ .build();
+ setInternalHeaderProvider(FixedHeaderProvider.create(headers));
+
return new EnhancedBigtableStubSettings(this);
}
//
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java
new file mode 100644
index 0000000000..278019b07e
--- /dev/null
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingServerStreamingCallable.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2023 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;
+
+import com.google.api.gax.rpc.ApiCallContext;
+import com.google.api.gax.rpc.DeadlineExceededException;
+import com.google.api.gax.rpc.ResourceExhaustedException;
+import com.google.api.gax.rpc.ResponseObserver;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamController;
+import com.google.api.gax.rpc.UnavailableException;
+import com.google.bigtable.v2.MutateRowsRequest;
+import com.google.bigtable.v2.MutateRowsResponse;
+import com.google.bigtable.v2.RateLimitInfo;
+import com.google.cloud.bigtable.data.v2.stub.metrics.BigtableTracer;
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Stopwatch;
+import com.google.common.util.concurrent.RateLimiter;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.annotation.Nonnull;
+import org.threeten.bp.Duration;
+import org.threeten.bp.Instant;
+
+class RateLimitingServerStreamingCallable
+ extends ServerStreamingCallable {
+ private static final Logger logger =
+ Logger.getLogger(RateLimitingServerStreamingCallable.class.getName());
+
+ // When the mutation size is large, starting with a higher QPS will make
+ // the dataflow job fail very quickly. Start with lower QPS and increase
+ // the QPS gradually if the server doesn't push back
+ private static final long DEFAULT_QPS = 10;
+
+ // Default interval before changing the QPS on error responses
+ private static final Duration DEFAULT_PERIOD = Duration.ofSeconds(10);
+
+ // Minimum QPS to make sure the job is not stuck
+ private static final double MIN_QPS = 0.1;
+ private static final double MAX_QPS = 100_000;
+
+ // QPS can be lowered to at most MIN_FACTOR * currentQps. When server returned
+ // an error, use MIN_FACTOR to calculate the new QPS. This is the same as
+ // the server side cap.
+ @VisibleForTesting static final double MIN_FACTOR = 0.7;
+
+ // QPS can be increased to at most MAX_FACTOR * currentQps. This is the same
+ // as the server side cap
+ private static final double MAX_FACTOR = 1.3;
+
+ private final RateLimiter limiter;
+
+ private final AtomicReference lastQpsChangeTime = new AtomicReference<>(Instant.now());
+ private final ServerStreamingCallable innerCallable;
+
+ RateLimitingServerStreamingCallable(
+ @Nonnull ServerStreamingCallable innerCallable) {
+ this.limiter = RateLimiter.create(DEFAULT_QPS);
+ this.innerCallable = Preconditions.checkNotNull(innerCallable, "Inner callable must be set");
+ logger.info("Rate limiting is enabled with initial QPS of " + limiter.getRate());
+ }
+
+ @Override
+ public void call(
+ MutateRowsRequest request,
+ ResponseObserver responseObserver,
+ ApiCallContext context) {
+ Stopwatch stopwatch = Stopwatch.createStarted();
+ limiter.acquire();
+ stopwatch.stop();
+ if (context.getTracer() instanceof BigtableTracer) {
+ ((BigtableTracer) context.getTracer())
+ .batchRequestThrottled(stopwatch.elapsed(TimeUnit.MILLISECONDS));
+ }
+ RateLimitingResponseObserver innerObserver =
+ new RateLimitingResponseObserver(limiter, lastQpsChangeTime, responseObserver);
+ innerCallable.call(request, innerObserver, context);
+ }
+
+ class RateLimitingResponseObserver extends SafeResponseObserver {
+ private final ResponseObserver outerObserver;
+ private final RateLimiter rateLimiter;
+
+ private final AtomicReference lastQpsChangeTime;
+
+ RateLimitingResponseObserver(
+ RateLimiter rateLimiter,
+ AtomicReference lastQpsChangeTime,
+ ResponseObserver observer) {
+ super(observer);
+ this.outerObserver = observer;
+ this.rateLimiter = rateLimiter;
+ this.lastQpsChangeTime = lastQpsChangeTime;
+ }
+
+ @Override
+ protected void onStartImpl(StreamController controller) {
+ outerObserver.onStart(controller);
+ }
+
+ @Override
+ protected void onResponseImpl(MutateRowsResponse response) {
+ if (response.hasRateLimitInfo()) {
+ RateLimitInfo info = response.getRateLimitInfo();
+ // RateLimitInfo is an optional field. However, proto3 sub-message field always
+ // have presence even thought it's marked as "optional". Check the factor and
+ // period to make sure they're not 0.
+ if (info.getFactor() != 0 && info.getPeriod().getSeconds() != 0) {
+ updateQps(
+ info.getFactor(),
+ Duration.ofSeconds(com.google.protobuf.util.Durations.toSeconds(info.getPeriod())));
+ }
+ }
+ }
+
+ @Override
+ protected void onErrorImpl(Throwable t) {
+ // When server returns DEADLINE_EXCEEDED, UNAVAILABLE or RESOURCE_EXHAUSTED,
+ // assume cbt server is overloaded
+ if (t instanceof DeadlineExceededException
+ || t instanceof UnavailableException
+ || t instanceof ResourceExhaustedException) {
+ updateQps(MIN_FACTOR, DEFAULT_PERIOD);
+ }
+ outerObserver.onError(t);
+ }
+
+ @Override
+ protected void onCompleteImpl() {
+ outerObserver.onComplete();
+ }
+
+ private void updateQps(double factor, Duration period) {
+ Instant lastTime = lastQpsChangeTime.get();
+ Instant now = Instant.now();
+
+ if (now.minus(period).isAfter(lastTime) && lastQpsChangeTime.compareAndSet(lastTime, now)) {
+ double cappedFactor = Math.min(Math.max(factor, MIN_FACTOR), MAX_FACTOR);
+ double currentRate = limiter.getRate();
+ limiter.setRate(Math.min(Math.max(currentRate * cappedFactor, MIN_QPS), MAX_QPS));
+ logger.log(
+ Level.FINE,
+ "Updated QPS from {0} to {1}, server returned factor is {2}, capped factor is {3}",
+ new Object[] {currentRate, limiter.getRate(), factor, cappedFactor});
+ }
+ }
+ }
+
+ @VisibleForTesting
+ AtomicReference getLastQpsChangeTime() {
+ return lastQpsChangeTime;
+ }
+
+ @VisibleForTesting
+ double getCurrentRate() {
+ return limiter.getRate();
+ }
+}
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java
index de4fbe92fc..6b8d3f9c51 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataSettingsTest.java
@@ -36,6 +36,7 @@ public void testToString() {
// disable channel priming so we won't need authentication
// for sending the prime request since we're only testing the settings.
.setRefreshingChannel(false)
+ .setBulkMutationFlowControl(true)
.build();
EnhancedBigtableStubSettings stubSettings = settings.getStubSettings();
assertThat(settings.toString())
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettingsTest.java
index 488805f60c..3337e12b6d 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettingsTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/BigtableBatchingCallSettingsTest.java
@@ -96,6 +96,14 @@ public void testBuilder() {
assertThat(settings.getDynamicFlowControlSettings()).isNotNull();
verifyFlowControlSettingWhenLatencyBasedThrottlingDisabled(
settings.getDynamicFlowControlSettings());
+
+ builder.setServerInitiatedFlowControl(true);
+ settings = builder.build();
+ assertThat(settings.isServerInitiatedFlowControlEnabled()).isTrue();
+
+ builder.setServerInitiatedFlowControl(false);
+ settings = builder.build();
+ assertThat(settings.isServerInitiatedFlowControlEnabled()).isFalse();
}
@Test
@@ -108,7 +116,8 @@ public void testBuilderFromSettings() {
.setBatchingSettings(BATCHING_SETTINGS)
.setRetryableCodes(StatusCode.Code.UNAVAILABLE, StatusCode.Code.UNAUTHENTICATED)
.setRetrySettings(retrySettings)
- .enableLatencyBasedThrottling(10L);
+ .enableLatencyBasedThrottling(10L)
+ .setServerInitiatedFlowControl(true);
BigtableBatchingCallSettings settings = builder.build();
BigtableBatchingCallSettings.Builder newBuilder = settings.toBuilder();
@@ -122,6 +131,7 @@ public void testBuilderFromSettings() {
assertThat(newBuilder.getDynamicFlowControlSettings()).isNotNull();
verifyFlowControlSettingWhenLatencyBasedThrottlingEnabled(
newBuilder.getDynamicFlowControlSettings());
+ assertThat(newBuilder.isServerInitiatedFlowControlEnabled()).isTrue();
}
@Test
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 a754421ad9..fbd6442e0c 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
@@ -831,8 +831,8 @@ public void testToString() {
nonStaticFields++;
}
}
- // failure will signal about adding a new settings property
- assertThat(SETTINGS_LIST.length).isEqualTo(nonStaticFields);
+ // failure will signal about adding a new settings property - feature flag field
+ assertThat(SETTINGS_LIST.length).isEqualTo(nonStaticFields - 1);
}
void checkToString(EnhancedBigtableStubSettings settings) {
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 16100ad044..c147c112e5 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
@@ -33,6 +33,7 @@
import com.google.api.gax.rpc.ServerStreamingCallable;
import com.google.auth.oauth2.ServiceAccountJwtAccessCredentials;
import com.google.bigtable.v2.BigtableGrpc;
+import com.google.bigtable.v2.FeatureFlags;
import com.google.bigtable.v2.MutateRowsRequest;
import com.google.bigtable.v2.MutateRowsResponse;
import com.google.bigtable.v2.PingAndWarmRequest;
@@ -45,6 +46,7 @@
import com.google.cloud.bigtable.data.v2.BigtableDataSettings;
import com.google.cloud.bigtable.data.v2.FakeServiceBuilder;
import com.google.cloud.bigtable.data.v2.internal.RequestContext;
+import com.google.cloud.bigtable.data.v2.models.BulkMutation;
import com.google.cloud.bigtable.data.v2.models.DefaultRowAdapter;
import com.google.cloud.bigtable.data.v2.models.Query;
import com.google.cloud.bigtable.data.v2.models.Row;
@@ -77,6 +79,7 @@
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
+import java.util.Base64;
import java.util.Collection;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
@@ -486,6 +489,45 @@ public void testCallContextPropagatedInReadBatcher()
}
}
+ @Test
+ public void testBulkMutationFlowControlFeatureFlagIsSet() throws Exception {
+ BulkMutation bulkMutation =
+ BulkMutation.create("my-table")
+ .add(RowMutationEntry.create("row-key").setCell("cf", "q", "value"));
+
+ // Test the header is set when the feature is enabled
+ EnhancedBigtableStubSettings.Builder settings = defaultSettings.toBuilder();
+ settings.bulkMutateRowsSettings().setServerInitiatedFlowControl(true);
+ EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build());
+ stub.bulkMutateRowsCallable().call(bulkMutation);
+ assertThat(metadataInterceptor.headers).hasSize(1);
+ Metadata metadata = metadataInterceptor.headers.take();
+ String encodedFlags =
+ metadata.get(Metadata.Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER));
+ byte[] decodedFlags = Base64.getDecoder().decode(encodedFlags);
+ FeatureFlags featureFlags = FeatureFlags.parseFrom(decodedFlags);
+ assertThat(featureFlags.getMutateRowsRateLimit()).isTrue();
+ }
+
+ @Test
+ public void testBulkMutationFlowControlFeatureFlagIsNotSet() throws Exception {
+ BulkMutation bulkMutation =
+ BulkMutation.create("my-table")
+ .add(RowMutationEntry.create("row-key").setCell("cf", "q", "value"));
+
+ EnhancedBigtableStubSettings.Builder settings = defaultSettings.toBuilder();
+ settings.bulkMutateRowsSettings().setServerInitiatedFlowControl(false);
+ EnhancedBigtableStub stub = EnhancedBigtableStub.create(settings.build());
+ stub.bulkMutateRowsCallable().call(bulkMutation);
+ assertThat(metadataInterceptor.headers).hasSize(1);
+ Metadata metadata = metadataInterceptor.headers.take();
+ String encodedFlags =
+ metadata.get(Metadata.Key.of("bigtable-features", Metadata.ASCII_STRING_MARSHALLER));
+ byte[] decodedFlags = Base64.getDecoder().decode(encodedFlags);
+ FeatureFlags featureFlags = FeatureFlags.parseFrom(decodedFlags);
+ assertThat(featureFlags.getMutateRowsRateLimit()).isFalse();
+ }
+
private static class MetadataInterceptor implements ServerInterceptor {
final BlockingQueue headers = Queues.newLinkedBlockingDeque();
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java
new file mode 100644
index 0000000000..96092b9e6e
--- /dev/null
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/RateLimitingCallableTest.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2023 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;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.api.gax.grpc.GrpcCallContext;
+import com.google.api.gax.rpc.ApiCallContext;
+import com.google.api.gax.rpc.DeadlineExceededException;
+import com.google.api.gax.rpc.ResponseObserver;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.api.gax.rpc.StreamController;
+import com.google.bigtable.v2.MutateRowsRequest;
+import com.google.bigtable.v2.MutateRowsResponse;
+import com.google.bigtable.v2.RateLimitInfo;
+import com.google.cloud.bigtable.gaxx.testing.FakeStatusCode;
+import com.google.protobuf.Duration;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.Mockito;
+import org.threeten.bp.Instant;
+
+@RunWith(JUnit4.class)
+public class RateLimitingCallableTest {
+
+ private final MutateRowsRequest request =
+ MutateRowsRequest.newBuilder().getDefaultInstanceForType();
+ private final ResponseObserver responseObserver =
+ Mockito.mock(ResponseObserver.class);
+ private final ApiCallContext context = GrpcCallContext.createDefault();
+ private MockCallable innerCallable;
+ RateLimitingServerStreamingCallable callableToTest;
+
+ @Before
+ public void setup() throws Exception {
+ innerCallable = new MockCallable();
+ callableToTest = new RateLimitingServerStreamingCallable(innerCallable);
+ }
+
+ @Test
+ public void testWithRateLimitInfo() throws Exception {
+ callableToTest.call(request, responseObserver, context);
+
+ Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1));
+
+ // make sure QPS will be updated
+ callableToTest.getLastQpsChangeTime().set(earlier);
+ double oldQps = callableToTest.getCurrentRate();
+
+ double factor = 0.8;
+
+ RateLimitInfo info =
+ RateLimitInfo.newBuilder()
+ .setFactor(factor)
+ .setPeriod(Duration.newBuilder().setSeconds(10).build())
+ .build();
+
+ MutateRowsResponse response = MutateRowsResponse.newBuilder().setRateLimitInfo(info).build();
+
+ innerCallable.getObserver().onResponse(response);
+
+ // Give the thread sometime to update the QPS
+ Thread.sleep(100);
+ double newQps = callableToTest.getCurrentRate();
+
+ assertThat(newQps).isWithin(0.1).of(oldQps * factor);
+
+ innerCallable.getObserver().onComplete();
+ }
+
+ @Test
+ public void testNoUpdateWithinPeriod() throws Exception {
+ callableToTest.call(request, responseObserver, context);
+
+ Instant now = Instant.now();
+ // make sure QPS will not be updated
+ callableToTest.getLastQpsChangeTime().set(now);
+ double oldQps = callableToTest.getCurrentRate();
+
+ double factor = 0.3;
+
+ RateLimitInfo info =
+ RateLimitInfo.newBuilder()
+ .setFactor(factor)
+ .setPeriod(Duration.newBuilder().setSeconds(600).build())
+ .build();
+
+ MutateRowsResponse response = MutateRowsResponse.newBuilder().setRateLimitInfo(info).build();
+
+ innerCallable.getObserver().onResponse(response);
+
+ // Give the thread sometime to update the QPS
+ Thread.sleep(100);
+ double newQps = callableToTest.getCurrentRate();
+
+ assertThat(newQps).isEqualTo(oldQps);
+
+ innerCallable.getObserver().onComplete();
+ }
+
+ @Test
+ public void testErrorInfoLowerQPS() throws Exception {
+ callableToTest.call(request, responseObserver, context);
+
+ Instant earlier = Instant.now().minus(org.threeten.bp.Duration.ofHours(1));
+
+ // make sure QPS will be updated
+ callableToTest.getLastQpsChangeTime().set(earlier);
+ double oldQps = callableToTest.getCurrentRate();
+
+ innerCallable
+ .getObserver()
+ .onError(
+ new DeadlineExceededException(
+ new Throwable(), new FakeStatusCode(StatusCode.Code.DEADLINE_EXCEEDED), false));
+
+ // Give the thread sometime to update the QPS
+ Thread.sleep(100);
+ double newQps = callableToTest.getCurrentRate();
+
+ assertThat(newQps).isWithin(0.1).of(oldQps * RateLimitingServerStreamingCallable.MIN_FACTOR);
+ }
+
+ private static class MockResponseObserver implements ResponseObserver {
+
+ private ResponseObserver observer;
+
+ MockResponseObserver(ResponseObserver responseObserver) {
+ this.observer = responseObserver;
+ }
+
+ @Override
+ public void onStart(StreamController streamController) {
+ observer.onStart(streamController);
+ }
+
+ @Override
+ public void onResponse(MutateRowsResponse o) {
+ observer.onResponse(o);
+ }
+
+ @Override
+ public void onError(Throwable throwable) {
+ observer.onError(throwable);
+ }
+
+ @Override
+ public void onComplete() {
+ observer.onComplete();
+ }
+ }
+
+ private static class MockCallable
+ extends ServerStreamingCallable {
+
+ private ResponseObserver observer;
+
+ @Override
+ public void call(
+ MutateRowsRequest mutateRowsRequest,
+ ResponseObserver responseObserver,
+ ApiCallContext apiCallContext) {
+ observer = new MockResponseObserver(responseObserver);
+ }
+
+ ResponseObserver getObserver() {
+ return observer;
+ }
+ }
+}
diff --git a/grpc-google-cloud-bigtable-admin-v2/pom.xml b/grpc-google-cloud-bigtable-admin-v2/pom.xml
index 3db6746779..5f7390b6dc 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.21.0
+ 2.22.0
grpc-google-cloud-bigtable-admin-v2
GRPC library for grpc-google-cloud-bigtable-admin-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.21.0
+ 2.22.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.21.0
+ 2.22.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.21.0
+ 2.22.0
pom
import
diff --git a/grpc-google-cloud-bigtable-v2/pom.xml b/grpc-google-cloud-bigtable-v2/pom.xml
index a776f4e037..9ed11bbe5b 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.21.0
+ 2.22.0
grpc-google-cloud-bigtable-v2
GRPC library for grpc-google-cloud-bigtable-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.21.0
+ 2.22.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.21.0
+ 2.22.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.21.0
+ 2.22.0
pom
import
diff --git a/pom.xml b/pom.xml
index 791ff755db..fb792f8805 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
google-cloud-bigtable-parent
pom
- 2.21.0
+ 2.22.0
Google Cloud Bigtable Parent
https://github.com/googleapis/java-bigtable
@@ -153,27 +153,27 @@
com.google.api.grpc
proto-google-cloud-bigtable-v2
- 2.21.0
+ 2.22.0
com.google.api.grpc
proto-google-cloud-bigtable-admin-v2
- 2.21.0
+ 2.22.0
com.google.api.grpc
grpc-google-cloud-bigtable-v2
- 2.21.0
+ 2.22.0
com.google.api.grpc
grpc-google-cloud-bigtable-admin-v2
- 2.21.0
+ 2.22.0
com.google.cloud
google-cloud-bigtable
- 2.21.0
+ 2.22.0
diff --git a/proto-google-cloud-bigtable-admin-v2/pom.xml b/proto-google-cloud-bigtable-admin-v2/pom.xml
index 17201ea92e..d81281d5ab 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.21.0
+ 2.22.0
proto-google-cloud-bigtable-admin-v2
PROTO library for proto-google-cloud-bigtable-admin-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.21.0
+ 2.22.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.21.0
+ 2.22.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.21.0
+ 2.22.0
pom
import
diff --git a/proto-google-cloud-bigtable-v2/pom.xml b/proto-google-cloud-bigtable-v2/pom.xml
index 0ea95c1e4b..520d6f9bb4 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.21.0
+ 2.22.0
proto-google-cloud-bigtable-v2
PROTO library for proto-google-cloud-bigtable-v2
com.google.cloud
google-cloud-bigtable-parent
- 2.21.0
+ 2.22.0
@@ -18,14 +18,14 @@
com.google.cloud
google-cloud-bigtable-deps-bom
- 2.21.0
+ 2.22.0
pom
import
com.google.cloud
google-cloud-bigtable-bom
- 2.21.0
+ 2.22.0
pom
import
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java
index 87ba2cbdd2..c64726804b 100644
--- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/BigtableProto.java
@@ -71,6 +71,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_bigtable_v2_MutateRowsResponse_Entry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_bigtable_v2_RateLimitInfo_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -186,168 +190,172 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\022A\n\007entries\030\002 \003(\0132+.google.bigtable.v2.M"
+ "utateRowsRequest.EntryB\003\340A\002\032N\n\005Entry\022\017\n\007"
+ "row_key\030\001 \001(\014\0224\n\tmutations\030\002 \003(\0132\034.googl"
- + "e.bigtable.v2.MutationB\003\340A\002\"\217\001\n\022MutateRo"
+ + "e.bigtable.v2.MutationB\003\340A\002\"\344\001\n\022MutateRo"
+ "wsResponse\022=\n\007entries\030\001 \003(\0132,.google.big"
- + "table.v2.MutateRowsResponse.Entry\032:\n\005Ent"
- + "ry\022\r\n\005index\030\001 \001(\003\022\"\n\006status\030\002 \001(\0132\022.goog"
- + "le.rpc.Status\"\256\002\n\030CheckAndMutateRowReque"
- + "st\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtable"
- + "admin.googleapis.com/Table\022\026\n\016app_profil"
- + "e_id\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0227\n\020pred"
- + "icate_filter\030\006 \001(\0132\035.google.bigtable.v2."
- + "RowFilter\0224\n\016true_mutations\030\004 \003(\0132\034.goog"
- + "le.bigtable.v2.Mutation\0225\n\017false_mutatio"
- + "ns\030\005 \003(\0132\034.google.bigtable.v2.Mutation\"6"
- + "\n\031CheckAndMutateRowResponse\022\031\n\021predicate"
- + "_matched\030\001 \001(\010\"i\n\022PingAndWarmRequest\022;\n\004"
- + "name\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin.google"
- + "apis.com/Instance\022\026\n\016app_profile_id\030\002 \001("
- + "\t\"\025\n\023PingAndWarmResponse\"\306\001\n\031ReadModifyW"
- + "riteRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372"
- + "A$\n\"bigtableadmin.googleapis.com/Table\022\026"
- + "\n\016app_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014B"
- + "\003\340A\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v2"
- + ".ReadModifyWriteRuleB\003\340A\002\"B\n\032ReadModifyW"
- + "riteRowResponse\022$\n\003row\030\001 \001(\0132\027.google.bi"
- + "gtable.v2.Row\"\206\001\n,GenerateInitialChangeS"
- + "treamPartitionsRequest\022>\n\ntable_name\030\001 \001"
- + "(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.com"
- + "/Table\022\026\n\016app_profile_id\030\002 \001(\t\"g\n-Genera"
- + "teInitialChangeStreamPartitionsResponse\022"
- + "6\n\tpartition\030\001 \001(\0132#.google.bigtable.v2."
- + "StreamPartition\"\233\003\n\027ReadChangeStreamRequ"
+ + "table.v2.MutateRowsResponse.Entry\022?\n\017rat"
+ + "e_limit_info\030\003 \001(\0132!.google.bigtable.v2."
+ + "RateLimitInfoH\000\210\001\001\032:\n\005Entry\022\r\n\005index\030\001 \001"
+ + "(\003\022\"\n\006status\030\002 \001(\0132\022.google.rpc.StatusB\022"
+ + "\n\020_rate_limit_info\"J\n\rRateLimitInfo\022)\n\006p"
+ + "eriod\030\001 \001(\0132\031.google.protobuf.Duration\022\016"
+ + "\n\006factor\030\002 \001(\001\"\256\002\n\030CheckAndMutateRowRequ"
+ "est\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtabl"
+ "eadmin.googleapis.com/Table\022\026\n\016app_profi"
- + "le_id\030\002 \001(\t\0226\n\tpartition\030\003 \001(\0132#.google."
- + "bigtable.v2.StreamPartition\0220\n\nstart_tim"
- + "e\030\004 \001(\0132\032.google.protobuf.TimestampH\000\022K\n"
- + "\023continuation_tokens\030\006 \001(\0132,.google.bigt"
- + "able.v2.StreamContinuationTokensH\000\022,\n\010en"
- + "d_time\030\005 \001(\0132\032.google.protobuf.Timestamp"
- + "\0225\n\022heartbeat_duration\030\007 \001(\0132\031.google.pr"
- + "otobuf.DurationB\014\n\nstart_from\"\251\n\n\030ReadCh"
- + "angeStreamResponse\022N\n\013data_change\030\001 \001(\0132"
- + "7.google.bigtable.v2.ReadChangeStreamRes"
- + "ponse.DataChangeH\000\022K\n\theartbeat\030\002 \001(\01326."
- + "google.bigtable.v2.ReadChangeStreamRespo"
- + "nse.HeartbeatH\000\022P\n\014close_stream\030\003 \001(\01328."
- + "google.bigtable.v2.ReadChangeStreamRespo"
- + "nse.CloseStreamH\000\032\364\001\n\rMutationChunk\022X\n\nc"
- + "hunk_info\030\001 \001(\0132D.google.bigtable.v2.Rea"
- + "dChangeStreamResponse.MutationChunk.Chun"
- + "kInfo\022.\n\010mutation\030\002 \001(\0132\034.google.bigtabl"
- + "e.v2.Mutation\032Y\n\tChunkInfo\022\032\n\022chunked_va"
- + "lue_size\030\001 \001(\005\022\034\n\024chunked_value_offset\030\002"
- + " \001(\005\022\022\n\nlast_chunk\030\003 \001(\010\032\306\003\n\nDataChange\022"
- + "J\n\004type\030\001 \001(\0162<.google.bigtable.v2.ReadC"
- + "hangeStreamResponse.DataChange.Type\022\031\n\021s"
- + "ource_cluster_id\030\002 \001(\t\022\017\n\007row_key\030\003 \001(\014\022"
- + "4\n\020commit_timestamp\030\004 \001(\0132\032.google.proto"
- + "buf.Timestamp\022\022\n\ntiebreaker\030\005 \001(\005\022J\n\006chu"
- + "nks\030\006 \003(\0132:.google.bigtable.v2.ReadChang"
- + "eStreamResponse.MutationChunk\022\014\n\004done\030\010 "
- + "\001(\010\022\r\n\005token\030\t \001(\t\022;\n\027estimated_low_wate"
- + "rmark\030\n \001(\0132\032.google.protobuf.Timestamp\""
- + "P\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001\022"
- + "\026\n\022GARBAGE_COLLECTION\020\002\022\020\n\014CONTINUATION\020"
- + "\003\032\221\001\n\tHeartbeat\022G\n\022continuation_token\030\001 "
- + "\001(\0132+.google.bigtable.v2.StreamContinuat"
- + "ionToken\022;\n\027estimated_low_watermark\030\002 \001("
- + "\0132\032.google.protobuf.Timestamp\032\270\001\n\013CloseS"
- + "tream\022\"\n\006status\030\001 \001(\0132\022.google.rpc.Statu"
- + "s\022H\n\023continuation_tokens\030\002 \003(\0132+.google."
- + "bigtable.v2.StreamContinuationToken\022;\n\016n"
- + "ew_partitions\030\003 \003(\0132#.google.bigtable.v2"
- + ".StreamPartitionB\017\n\rstream_record2\327\030\n\010Bi"
- + "gtable\022\233\002\n\010ReadRows\022#.google.bigtable.v2"
- + ".ReadRowsRequest\032$.google.bigtable.v2.Re"
- + "adRowsResponse\"\301\001\202\323\344\223\002>\"9/v2/{table_name"
- + "=projects/*/instances/*/tables/*}:readRo"
- + "ws:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name=p"
- + "rojects/*/instances/*/tables/*}\022\020\n\016app_p"
- + "rofile_id\332A\ntable_name\332A\031table_name,app_"
- + "profile_id0\001\022\254\002\n\rSampleRowKeys\022(.google."
- + "bigtable.v2.SampleRowKeysRequest\032).googl"
- + "e.bigtable.v2.SampleRowKeysResponse\"\303\001\202\323"
- + "\344\223\002@\022>/v2/{table_name=projects/*/instanc"
- + "es/*/tables/*}:sampleRowKeys\212\323\344\223\002N\022:\n\nta"
- + "ble_name\022,{table_name=projects/*/instanc"
- + "es/*/tables/*}\022\020\n\016app_profile_id\332A\ntable"
- + "_name\332A\031table_name,app_profile_id0\001\022\301\002\n\t"
- + "MutateRow\022$.google.bigtable.v2.MutateRow"
- + "Request\032%.google.bigtable.v2.MutateRowRe"
- + "sponse\"\346\001\202\323\344\223\002?\":/v2/{table_name=project"
- + "s/*/instances/*/tables/*}:mutateRow:\001*\212\323"
- + "\344\223\002N\022:\n\ntable_name\022,{table_name=projects"
- + "/*/instances/*/tables/*}\022\020\n\016app_profile_"
- + "id\332A\034table_name,row_key,mutations\332A+tabl"
- + "e_name,row_key,mutations,app_profile_id\022"
- + "\263\002\n\nMutateRows\022%.google.bigtable.v2.Muta"
- + "teRowsRequest\032&.google.bigtable.v2.Mutat"
- + "eRowsResponse\"\323\001\202\323\344\223\002@\";/v2/{table_name="
- + "projects/*/instances/*/tables/*}:mutateR"
+ + "le_id\030\007 \001(\t\022\024\n\007row_key\030\002 \001(\014B\003\340A\002\0227\n\020pre"
+ + "dicate_filter\030\006 \001(\0132\035.google.bigtable.v2"
+ + ".RowFilter\0224\n\016true_mutations\030\004 \003(\0132\034.goo"
+ + "gle.bigtable.v2.Mutation\0225\n\017false_mutati"
+ + "ons\030\005 \003(\0132\034.google.bigtable.v2.Mutation\""
+ + "6\n\031CheckAndMutateRowResponse\022\031\n\021predicat"
+ + "e_matched\030\001 \001(\010\"i\n\022PingAndWarmRequest\022;\n"
+ + "\004name\030\001 \001(\tB-\340A\002\372A\'\n%bigtableadmin.googl"
+ + "eapis.com/Instance\022\026\n\016app_profile_id\030\002 \001"
+ + "(\t\"\025\n\023PingAndWarmResponse\"\306\001\n\031ReadModify"
+ + "WriteRowRequest\022>\n\ntable_name\030\001 \001(\tB*\340A\002"
+ + "\372A$\n\"bigtableadmin.googleapis.com/Table\022"
+ + "\026\n\016app_profile_id\030\004 \001(\t\022\024\n\007row_key\030\002 \001(\014"
+ + "B\003\340A\002\022;\n\005rules\030\003 \003(\0132\'.google.bigtable.v"
+ + "2.ReadModifyWriteRuleB\003\340A\002\"B\n\032ReadModify"
+ + "WriteRowResponse\022$\n\003row\030\001 \001(\0132\027.google.b"
+ + "igtable.v2.Row\"\206\001\n,GenerateInitialChange"
+ + "StreamPartitionsRequest\022>\n\ntable_name\030\001 "
+ + "\001(\tB*\340A\002\372A$\n\"bigtableadmin.googleapis.co"
+ + "m/Table\022\026\n\016app_profile_id\030\002 \001(\t\"g\n-Gener"
+ + "ateInitialChangeStreamPartitionsResponse"
+ + "\0226\n\tpartition\030\001 \001(\0132#.google.bigtable.v2"
+ + ".StreamPartition\"\233\003\n\027ReadChangeStreamReq"
+ + "uest\022>\n\ntable_name\030\001 \001(\tB*\340A\002\372A$\n\"bigtab"
+ + "leadmin.googleapis.com/Table\022\026\n\016app_prof"
+ + "ile_id\030\002 \001(\t\0226\n\tpartition\030\003 \001(\0132#.google"
+ + ".bigtable.v2.StreamPartition\0220\n\nstart_ti"
+ + "me\030\004 \001(\0132\032.google.protobuf.TimestampH\000\022K"
+ + "\n\023continuation_tokens\030\006 \001(\0132,.google.big"
+ + "table.v2.StreamContinuationTokensH\000\022,\n\010e"
+ + "nd_time\030\005 \001(\0132\032.google.protobuf.Timestam"
+ + "p\0225\n\022heartbeat_duration\030\007 \001(\0132\031.google.p"
+ + "rotobuf.DurationB\014\n\nstart_from\"\251\n\n\030ReadC"
+ + "hangeStreamResponse\022N\n\013data_change\030\001 \001(\013"
+ + "27.google.bigtable.v2.ReadChangeStreamRe"
+ + "sponse.DataChangeH\000\022K\n\theartbeat\030\002 \001(\01326"
+ + ".google.bigtable.v2.ReadChangeStreamResp"
+ + "onse.HeartbeatH\000\022P\n\014close_stream\030\003 \001(\01328"
+ + ".google.bigtable.v2.ReadChangeStreamResp"
+ + "onse.CloseStreamH\000\032\364\001\n\rMutationChunk\022X\n\n"
+ + "chunk_info\030\001 \001(\0132D.google.bigtable.v2.Re"
+ + "adChangeStreamResponse.MutationChunk.Chu"
+ + "nkInfo\022.\n\010mutation\030\002 \001(\0132\034.google.bigtab"
+ + "le.v2.Mutation\032Y\n\tChunkInfo\022\032\n\022chunked_v"
+ + "alue_size\030\001 \001(\005\022\034\n\024chunked_value_offset\030"
+ + "\002 \001(\005\022\022\n\nlast_chunk\030\003 \001(\010\032\306\003\n\nDataChange"
+ + "\022J\n\004type\030\001 \001(\0162<.google.bigtable.v2.Read"
+ + "ChangeStreamResponse.DataChange.Type\022\031\n\021"
+ + "source_cluster_id\030\002 \001(\t\022\017\n\007row_key\030\003 \001(\014"
+ + "\0224\n\020commit_timestamp\030\004 \001(\0132\032.google.prot"
+ + "obuf.Timestamp\022\022\n\ntiebreaker\030\005 \001(\005\022J\n\006ch"
+ + "unks\030\006 \003(\0132:.google.bigtable.v2.ReadChan"
+ + "geStreamResponse.MutationChunk\022\014\n\004done\030\010"
+ + " \001(\010\022\r\n\005token\030\t \001(\t\022;\n\027estimated_low_wat"
+ + "ermark\030\n \001(\0132\032.google.protobuf.Timestamp"
+ + "\"P\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\010\n\004USER\020\001"
+ + "\022\026\n\022GARBAGE_COLLECTION\020\002\022\020\n\014CONTINUATION"
+ + "\020\003\032\221\001\n\tHeartbeat\022G\n\022continuation_token\030\001"
+ + " \001(\0132+.google.bigtable.v2.StreamContinua"
+ + "tionToken\022;\n\027estimated_low_watermark\030\002 \001"
+ + "(\0132\032.google.protobuf.Timestamp\032\270\001\n\013Close"
+ + "Stream\022\"\n\006status\030\001 \001(\0132\022.google.rpc.Stat"
+ + "us\022H\n\023continuation_tokens\030\002 \003(\0132+.google"
+ + ".bigtable.v2.StreamContinuationToken\022;\n\016"
+ + "new_partitions\030\003 \003(\0132#.google.bigtable.v"
+ + "2.StreamPartitionB\017\n\rstream_record2\327\030\n\010B"
+ + "igtable\022\233\002\n\010ReadRows\022#.google.bigtable.v"
+ + "2.ReadRowsRequest\032$.google.bigtable.v2.R"
+ + "eadRowsResponse\"\301\001\202\323\344\223\002>\"9/v2/{table_nam"
+ + "e=projects/*/instances/*/tables/*}:readR"
+ "ows:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name="
+ "projects/*/instances/*/tables/*}\022\020\n\016app_"
- + "profile_id\332A\022table_name,entries\332A!table_"
- + "name,entries,app_profile_id0\001\022\255\003\n\021CheckA"
- + "ndMutateRow\022,.google.bigtable.v2.CheckAn"
- + "dMutateRowRequest\032-.google.bigtable.v2.C"
- + "heckAndMutateRowResponse\"\272\002\202\323\344\223\002G\"B/v2/{"
- + "table_name=projects/*/instances/*/tables"
- + "/*}:checkAndMutateRow:\001*\212\323\344\223\002N\022:\n\ntable_"
- + "name\022,{table_name=projects/*/instances/*"
- + "/tables/*}\022\020\n\016app_profile_id\332ABtable_nam"
- + "e,row_key,predicate_filter,true_mutation"
- + "s,false_mutations\332AQtable_name,row_key,p"
- + "redicate_filter,true_mutations,false_mut"
- + "ations,app_profile_id\022\356\001\n\013PingAndWarm\022&."
- + "google.bigtable.v2.PingAndWarmRequest\032\'."
- + "google.bigtable.v2.PingAndWarmResponse\"\215"
- + "\001\202\323\344\223\002+\"&/v2/{name=projects/*/instances/"
- + "*}:ping:\001*\212\323\344\223\0029\022%\n\004name\022\035{name=projects"
- + "/*/instances/*}\022\020\n\016app_profile_id\332A\004name"
- + "\332A\023name,app_profile_id\022\335\002\n\022ReadModifyWri"
- + "teRow\022-.google.bigtable.v2.ReadModifyWri"
- + "teRowRequest\032..google.bigtable.v2.ReadMo"
- + "difyWriteRowResponse\"\347\001\202\323\344\223\002H\"C/v2/{tabl"
- + "e_name=projects/*/instances/*/tables/*}:"
- + "readModifyWriteRow:\001*\212\323\344\223\002N\022:\n\ntable_nam"
- + "e\022,{table_name=projects/*/instances/*/ta"
- + "bles/*}\022\020\n\016app_profile_id\332A\030table_name,r"
- + "ow_key,rules\332A\'table_name,row_key,rules,"
- + "app_profile_id\022\273\002\n%GenerateInitialChange"
- + "StreamPartitions\022@.google.bigtable.v2.Ge"
- + "nerateInitialChangeStreamPartitionsReque"
- + "st\032A.google.bigtable.v2.GenerateInitialC"
- + "hangeStreamPartitionsResponse\"\212\001\202\323\344\223\002[\"V"
- + "/v2/{table_name=projects/*/instances/*/t"
- + "ables/*}:generateInitialChangeStreamPart"
- + "itions:\001*\332A\ntable_name\332A\031table_name,app_"
- + "profile_id0\001\022\346\001\n\020ReadChangeStream\022+.goog"
- + "le.bigtable.v2.ReadChangeStreamRequest\032,"
- + ".google.bigtable.v2.ReadChangeStreamResp"
- + "onse\"u\202\323\344\223\002F\"A/v2/{table_name=projects/*"
- + "/instances/*/tables/*}:readChangeStream:"
- + "\001*\332A\ntable_name\332A\031table_name,app_profile"
- + "_id0\001\032\333\002\312A\027bigtable.googleapis.com\322A\275\002ht"
- + "tps://www.googleapis.com/auth/bigtable.d"
- + "ata,https://www.googleapis.com/auth/bigt"
- + "able.data.readonly,https://www.googleapi"
- + "s.com/auth/cloud-bigtable.data,https://w"
- + "ww.googleapis.com/auth/cloud-bigtable.da"
- + "ta.readonly,https://www.googleapis.com/a"
- + "uth/cloud-platform,https://www.googleapi"
- + "s.com/auth/cloud-platform.read-onlyB\353\002\n\026"
- + "com.google.bigtable.v2B\rBigtableProtoP\001Z"
- + ":google.golang.org/genproto/googleapis/b"
- + "igtable/v2;bigtable\252\002\030Google.Cloud.Bigta"
- + "ble.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Goog"
- + "le::Cloud::Bigtable::V2\352AP\n%bigtableadmi"
- + "n.googleapis.com/Instance\022\'projects/{pro"
- + "ject}/instances/{instance}\352A\\\n\"bigtablea"
- + "dmin.googleapis.com/Table\0226projects/{pro"
- + "ject}/instances/{instance}/tables/{table"
- + "}b\006proto3"
+ + "profile_id\332A\ntable_name\332A\031table_name,app"
+ + "_profile_id0\001\022\254\002\n\rSampleRowKeys\022(.google"
+ + ".bigtable.v2.SampleRowKeysRequest\032).goog"
+ + "le.bigtable.v2.SampleRowKeysResponse\"\303\001\202"
+ + "\323\344\223\002@\022>/v2/{table_name=projects/*/instan"
+ + "ces/*/tables/*}:sampleRowKeys\212\323\344\223\002N\022:\n\nt"
+ + "able_name\022,{table_name=projects/*/instan"
+ + "ces/*/tables/*}\022\020\n\016app_profile_id\332A\ntabl"
+ + "e_name\332A\031table_name,app_profile_id0\001\022\301\002\n"
+ + "\tMutateRow\022$.google.bigtable.v2.MutateRo"
+ + "wRequest\032%.google.bigtable.v2.MutateRowR"
+ + "esponse\"\346\001\202\323\344\223\002?\":/v2/{table_name=projec"
+ + "ts/*/instances/*/tables/*}:mutateRow:\001*\212"
+ + "\323\344\223\002N\022:\n\ntable_name\022,{table_name=project"
+ + "s/*/instances/*/tables/*}\022\020\n\016app_profile"
+ + "_id\332A\034table_name,row_key,mutations\332A+tab"
+ + "le_name,row_key,mutations,app_profile_id"
+ + "\022\263\002\n\nMutateRows\022%.google.bigtable.v2.Mut"
+ + "ateRowsRequest\032&.google.bigtable.v2.Muta"
+ + "teRowsResponse\"\323\001\202\323\344\223\002@\";/v2/{table_name"
+ + "=projects/*/instances/*/tables/*}:mutate"
+ + "Rows:\001*\212\323\344\223\002N\022:\n\ntable_name\022,{table_name"
+ + "=projects/*/instances/*/tables/*}\022\020\n\016app"
+ + "_profile_id\332A\022table_name,entries\332A!table"
+ + "_name,entries,app_profile_id0\001\022\255\003\n\021Check"
+ + "AndMutateRow\022,.google.bigtable.v2.CheckA"
+ + "ndMutateRowRequest\032-.google.bigtable.v2."
+ + "CheckAndMutateRowResponse\"\272\002\202\323\344\223\002G\"B/v2/"
+ + "{table_name=projects/*/instances/*/table"
+ + "s/*}:checkAndMutateRow:\001*\212\323\344\223\002N\022:\n\ntable"
+ + "_name\022,{table_name=projects/*/instances/"
+ + "*/tables/*}\022\020\n\016app_profile_id\332ABtable_na"
+ + "me,row_key,predicate_filter,true_mutatio"
+ + "ns,false_mutations\332AQtable_name,row_key,"
+ + "predicate_filter,true_mutations,false_mu"
+ + "tations,app_profile_id\022\356\001\n\013PingAndWarm\022&"
+ + ".google.bigtable.v2.PingAndWarmRequest\032\'"
+ + ".google.bigtable.v2.PingAndWarmResponse\""
+ + "\215\001\202\323\344\223\002+\"&/v2/{name=projects/*/instances"
+ + "/*}:ping:\001*\212\323\344\223\0029\022%\n\004name\022\035{name=project"
+ + "s/*/instances/*}\022\020\n\016app_profile_id\332A\004nam"
+ + "e\332A\023name,app_profile_id\022\335\002\n\022ReadModifyWr"
+ + "iteRow\022-.google.bigtable.v2.ReadModifyWr"
+ + "iteRowRequest\032..google.bigtable.v2.ReadM"
+ + "odifyWriteRowResponse\"\347\001\202\323\344\223\002H\"C/v2/{tab"
+ + "le_name=projects/*/instances/*/tables/*}"
+ + ":readModifyWriteRow:\001*\212\323\344\223\002N\022:\n\ntable_na"
+ + "me\022,{table_name=projects/*/instances/*/t"
+ + "ables/*}\022\020\n\016app_profile_id\332A\030table_name,"
+ + "row_key,rules\332A\'table_name,row_key,rules"
+ + ",app_profile_id\022\273\002\n%GenerateInitialChang"
+ + "eStreamPartitions\022@.google.bigtable.v2.G"
+ + "enerateInitialChangeStreamPartitionsRequ"
+ + "est\032A.google.bigtable.v2.GenerateInitial"
+ + "ChangeStreamPartitionsResponse\"\212\001\202\323\344\223\002[\""
+ + "V/v2/{table_name=projects/*/instances/*/"
+ + "tables/*}:generateInitialChangeStreamPar"
+ + "titions:\001*\332A\ntable_name\332A\031table_name,app"
+ + "_profile_id0\001\022\346\001\n\020ReadChangeStream\022+.goo"
+ + "gle.bigtable.v2.ReadChangeStreamRequest\032"
+ + ",.google.bigtable.v2.ReadChangeStreamRes"
+ + "ponse\"u\202\323\344\223\002F\"A/v2/{table_name=projects/"
+ + "*/instances/*/tables/*}:readChangeStream"
+ + ":\001*\332A\ntable_name\332A\031table_name,app_profil"
+ + "e_id0\001\032\333\002\312A\027bigtable.googleapis.com\322A\275\002h"
+ + "ttps://www.googleapis.com/auth/bigtable."
+ + "data,https://www.googleapis.com/auth/big"
+ + "table.data.readonly,https://www.googleap"
+ + "is.com/auth/cloud-bigtable.data,https://"
+ + "www.googleapis.com/auth/cloud-bigtable.d"
+ + "ata.readonly,https://www.googleapis.com/"
+ + "auth/cloud-platform,https://www.googleap"
+ + "is.com/auth/cloud-platform.read-onlyB\353\002\n"
+ + "\026com.google.bigtable.v2B\rBigtableProtoP\001"
+ + "Z:google.golang.org/genproto/googleapis/"
+ + "bigtable/v2;bigtable\252\002\030Google.Cloud.Bigt"
+ + "able.V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Goo"
+ + "gle::Cloud::Bigtable::V2\352AP\n%bigtableadm"
+ + "in.googleapis.com/Instance\022\'projects/{pr"
+ + "oject}/instances/{instance}\352A\\\n\"bigtable"
+ + "admin.googleapis.com/Table\0226projects/{pr"
+ + "oject}/instances/{instance}/tables/{tabl"
+ + "e}b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -450,7 +458,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_MutateRowsResponse_descriptor,
new java.lang.String[] {
- "Entries",
+ "Entries", "RateLimitInfo", "RateLimitInfo",
});
internal_static_google_bigtable_v2_MutateRowsResponse_Entry_descriptor =
internal_static_google_bigtable_v2_MutateRowsResponse_descriptor.getNestedTypes().get(0);
@@ -460,8 +468,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"Index", "Status",
});
- internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor =
+ internal_static_google_bigtable_v2_RateLimitInfo_descriptor =
getDescriptor().getMessageTypes().get(8);
+ internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_bigtable_v2_RateLimitInfo_descriptor,
+ new java.lang.String[] {
+ "Period", "Factor",
+ });
+ internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor =
+ getDescriptor().getMessageTypes().get(9);
internal_static_google_bigtable_v2_CheckAndMutateRowRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_CheckAndMutateRowRequest_descriptor,
@@ -474,7 +490,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"FalseMutations",
});
internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor =
- getDescriptor().getMessageTypes().get(9);
+ getDescriptor().getMessageTypes().get(10);
internal_static_google_bigtable_v2_CheckAndMutateRowResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_CheckAndMutateRowResponse_descriptor,
@@ -482,7 +498,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"PredicateMatched",
});
internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor =
- getDescriptor().getMessageTypes().get(10);
+ getDescriptor().getMessageTypes().get(11);
internal_static_google_bigtable_v2_PingAndWarmRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_PingAndWarmRequest_descriptor,
@@ -490,13 +506,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Name", "AppProfileId",
});
internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor =
- getDescriptor().getMessageTypes().get(11);
+ getDescriptor().getMessageTypes().get(12);
internal_static_google_bigtable_v2_PingAndWarmResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_PingAndWarmResponse_descriptor,
new java.lang.String[] {});
internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor =
- getDescriptor().getMessageTypes().get(12);
+ getDescriptor().getMessageTypes().get(13);
internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_ReadModifyWriteRowRequest_descriptor,
@@ -504,7 +520,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"TableName", "AppProfileId", "RowKey", "Rules",
});
internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor =
- getDescriptor().getMessageTypes().get(13);
+ getDescriptor().getMessageTypes().get(14);
internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_ReadModifyWriteRowResponse_descriptor,
@@ -512,7 +528,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Row",
});
internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor =
- getDescriptor().getMessageTypes().get(14);
+ getDescriptor().getMessageTypes().get(15);
internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsRequest_descriptor,
@@ -520,7 +536,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"TableName", "AppProfileId",
});
internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor =
- getDescriptor().getMessageTypes().get(15);
+ getDescriptor().getMessageTypes().get(16);
internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_GenerateInitialChangeStreamPartitionsResponse_descriptor,
@@ -528,7 +544,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Partition",
});
internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor =
- getDescriptor().getMessageTypes().get(16);
+ getDescriptor().getMessageTypes().get(17);
internal_static_google_bigtable_v2_ReadChangeStreamRequest_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_ReadChangeStreamRequest_descriptor,
@@ -543,7 +559,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"StartFrom",
});
internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor =
- getDescriptor().getMessageTypes().get(17);
+ getDescriptor().getMessageTypes().get(18);
internal_static_google_bigtable_v2_ReadChangeStreamResponse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_ReadChangeStreamResponse_descriptor,
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java
new file mode 100644
index 0000000000..7eeab49c96
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlags.java
@@ -0,0 +1,553 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/bigtable/v2/feature_flags.proto
+
+package com.google.bigtable.v2;
+
+/**
+ *
+ *
+ *
+ * Feature flags supported by a client.
+ * This is intended to be sent as part of request metadata to assure the server
+ * that certain behaviors are safe to enable. This proto is meant to be
+ * serialized and websafe-base64 encoded under the `bigtable-features` metadata
+ * key. The value will remain constant for the lifetime of a client and due to
+ * HTTP2's HPACK compression, the request overhead will be tiny.
+ * This is an internal implementation detail and should not be used by endusers
+ * directly.
+ *
+ *
+ * Protobuf type {@code google.bigtable.v2.FeatureFlags}
+ */
+public final class FeatureFlags extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.bigtable.v2.FeatureFlags)
+ FeatureFlagsOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use FeatureFlags.newBuilder() to construct.
+ private FeatureFlags(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private FeatureFlags() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new FeatureFlags();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.bigtable.v2.FeatureFlagsProto
+ .internal_static_google_bigtable_v2_FeatureFlags_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.bigtable.v2.FeatureFlagsProto
+ .internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.bigtable.v2.FeatureFlags.class,
+ com.google.bigtable.v2.FeatureFlags.Builder.class);
+ }
+
+ public static final int MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER = 3;
+ private boolean mutateRowsRateLimit_ = false;
+ /**
+ *
+ *
+ *
+ * Notify the server that the client enables batch write flow control by
+ * requesting RateLimitInfo from MutateRowsResponse.
+ *
+ *
+ * bool mutate_rows_rate_limit = 3;
+ *
+ * @return The mutateRowsRateLimit.
+ */
+ @java.lang.Override
+ public boolean getMutateRowsRateLimit() {
+ return mutateRowsRateLimit_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (mutateRowsRateLimit_ != false) {
+ output.writeBool(3, mutateRowsRateLimit_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (mutateRowsRateLimit_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, mutateRowsRateLimit_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.bigtable.v2.FeatureFlags)) {
+ return super.equals(obj);
+ }
+ com.google.bigtable.v2.FeatureFlags other = (com.google.bigtable.v2.FeatureFlags) obj;
+
+ if (getMutateRowsRateLimit() != other.getMutateRowsRateLimit()) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMutateRowsRateLimit());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.bigtable.v2.FeatureFlags prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Feature flags supported by a client.
+ * This is intended to be sent as part of request metadata to assure the server
+ * that certain behaviors are safe to enable. This proto is meant to be
+ * serialized and websafe-base64 encoded under the `bigtable-features` metadata
+ * key. The value will remain constant for the lifetime of a client and due to
+ * HTTP2's HPACK compression, the request overhead will be tiny.
+ * This is an internal implementation detail and should not be used by endusers
+ * directly.
+ *
+ *
+ * Protobuf type {@code google.bigtable.v2.FeatureFlags}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.bigtable.v2.FeatureFlags)
+ com.google.bigtable.v2.FeatureFlagsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.bigtable.v2.FeatureFlagsProto
+ .internal_static_google_bigtable_v2_FeatureFlags_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.bigtable.v2.FeatureFlagsProto
+ .internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.bigtable.v2.FeatureFlags.class,
+ com.google.bigtable.v2.FeatureFlags.Builder.class);
+ }
+
+ // Construct using com.google.bigtable.v2.FeatureFlags.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ mutateRowsRateLimit_ = false;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.bigtable.v2.FeatureFlagsProto
+ .internal_static_google_bigtable_v2_FeatureFlags_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.FeatureFlags getDefaultInstanceForType() {
+ return com.google.bigtable.v2.FeatureFlags.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.FeatureFlags build() {
+ com.google.bigtable.v2.FeatureFlags result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.FeatureFlags buildPartial() {
+ com.google.bigtable.v2.FeatureFlags result = new com.google.bigtable.v2.FeatureFlags(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.bigtable.v2.FeatureFlags result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.mutateRowsRateLimit_ = mutateRowsRateLimit_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.bigtable.v2.FeatureFlags) {
+ return mergeFrom((com.google.bigtable.v2.FeatureFlags) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.bigtable.v2.FeatureFlags other) {
+ if (other == com.google.bigtable.v2.FeatureFlags.getDefaultInstance()) return this;
+ if (other.getMutateRowsRateLimit() != false) {
+ setMutateRowsRateLimit(other.getMutateRowsRateLimit());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 24:
+ {
+ mutateRowsRateLimit_ = input.readBool();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 24
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private boolean mutateRowsRateLimit_;
+ /**
+ *
+ *
+ *
+ * Notify the server that the client enables batch write flow control by
+ * requesting RateLimitInfo from MutateRowsResponse.
+ *
+ *
+ * bool mutate_rows_rate_limit = 3;
+ *
+ * @return The mutateRowsRateLimit.
+ */
+ @java.lang.Override
+ public boolean getMutateRowsRateLimit() {
+ return mutateRowsRateLimit_;
+ }
+ /**
+ *
+ *
+ *
+ * Notify the server that the client enables batch write flow control by
+ * requesting RateLimitInfo from MutateRowsResponse.
+ *
+ *
+ * bool mutate_rows_rate_limit = 3;
+ *
+ * @param value The mutateRowsRateLimit to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMutateRowsRateLimit(boolean value) {
+
+ mutateRowsRateLimit_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Notify the server that the client enables batch write flow control by
+ * requesting RateLimitInfo from MutateRowsResponse.
+ *
+ *
+ * bool mutate_rows_rate_limit = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMutateRowsRateLimit() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ mutateRowsRateLimit_ = false;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.bigtable.v2.FeatureFlags)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.bigtable.v2.FeatureFlags)
+ private static final com.google.bigtable.v2.FeatureFlags DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.bigtable.v2.FeatureFlags();
+ }
+
+ public static com.google.bigtable.v2.FeatureFlags getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public FeatureFlags parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.FeatureFlags getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java
new file mode 100644
index 0000000000..d4c7af3c72
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsOrBuilder.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/bigtable/v2/feature_flags.proto
+
+package com.google.bigtable.v2;
+
+public interface FeatureFlagsOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.bigtable.v2.FeatureFlags)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Notify the server that the client enables batch write flow control by
+ * requesting RateLimitInfo from MutateRowsResponse.
+ *
+ *
+ * bool mutate_rows_rate_limit = 3;
+ *
+ * @return The mutateRowsRateLimit.
+ */
+ boolean getMutateRowsRateLimit();
+}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java
new file mode 100644
index 0000000000..3bbdf09eca
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/FeatureFlagsProto.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/bigtable/v2/feature_flags.proto
+
+package com.google.bigtable.v2;
+
+public final class FeatureFlagsProto {
+ private FeatureFlagsProto() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_bigtable_v2_FeatureFlags_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ java.lang.String[] descriptorData = {
+ "\n&google/bigtable/v2/feature_flags.proto"
+ + "\022\022google.bigtable.v2\".\n\014FeatureFlags\022\036\n\026"
+ + "mutate_rows_rate_limit\030\003 \001(\010B\275\001\n\026com.goo"
+ + "gle.bigtable.v2B\021FeatureFlagsProtoP\001Z:go"
+ + "ogle.golang.org/genproto/googleapis/bigt"
+ + "able/v2;bigtable\252\002\030Google.Cloud.Bigtable"
+ + ".V2\312\002\030Google\\Cloud\\Bigtable\\V2\352\002\033Google:"
+ + ":Cloud::Bigtable::V2b\006proto3"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {});
+ internal_static_google_bigtable_v2_FeatureFlags_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_bigtable_v2_FeatureFlags_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_bigtable_v2_FeatureFlags_descriptor,
+ new java.lang.String[] {
+ "MutateRowsRateLimit",
+ });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java
index 24803ec454..f9e3dde3f1 100644
--- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponse.java
@@ -947,6 +947,7 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry getDefaultInstanceForType
}
}
+ private int bitField0_;
public static final int ENTRIES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
@@ -1018,6 +1019,62 @@ public com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuil
return entries_.get(index);
}
+ public static final int RATE_LIMIT_INFO_FIELD_NUMBER = 3;
+ private com.google.bigtable.v2.RateLimitInfo rateLimitInfo_;
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return Whether the rateLimitInfo field is set.
+ */
+ @java.lang.Override
+ public boolean hasRateLimitInfo() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return The rateLimitInfo.
+ */
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -1035,6 +1092,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < entries_.size(); i++) {
output.writeMessage(1, entries_.get(i));
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(3, getRateLimitInfo());
+ }
getUnknownFields().writeTo(output);
}
@@ -1047,6 +1107,9 @@ public int getSerializedSize() {
for (int i = 0; i < entries_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i));
}
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRateLimitInfo());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -1064,6 +1127,10 @@ public boolean equals(final java.lang.Object obj) {
(com.google.bigtable.v2.MutateRowsResponse) obj;
if (!getEntriesList().equals(other.getEntriesList())) return false;
+ if (hasRateLimitInfo() != other.hasRateLimitInfo()) return false;
+ if (hasRateLimitInfo()) {
+ if (!getRateLimitInfo().equals(other.getRateLimitInfo())) return false;
+ }
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1079,6 +1146,10 @@ public int hashCode() {
hash = (37 * hash) + ENTRIES_FIELD_NUMBER;
hash = (53 * hash) + getEntriesList().hashCode();
}
+ if (hasRateLimitInfo()) {
+ hash = (37 * hash) + RATE_LIMIT_INFO_FIELD_NUMBER;
+ hash = (53 * hash) + getRateLimitInfo().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -1208,10 +1279,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.bigtable.v2.MutateRowsResponse.newBuilder()
- private Builder() {}
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getEntriesFieldBuilder();
+ getRateLimitInfoFieldBuilder();
+ }
}
@java.lang.Override
@@ -1225,6 +1306,11 @@ public Builder clear() {
entriesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
+ rateLimitInfo_ = null;
+ if (rateLimitInfoBuilder_ != null) {
+ rateLimitInfoBuilder_.dispose();
+ rateLimitInfoBuilder_ = null;
+ }
return this;
}
@@ -1274,6 +1360,13 @@ private void buildPartialRepeatedFields(com.google.bigtable.v2.MutateRowsRespons
private void buildPartial0(com.google.bigtable.v2.MutateRowsResponse result) {
int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.rateLimitInfo_ =
+ rateLimitInfoBuilder_ == null ? rateLimitInfo_ : rateLimitInfoBuilder_.build();
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
@@ -1348,6 +1441,9 @@ public Builder mergeFrom(com.google.bigtable.v2.MutateRowsResponse other) {
}
}
}
+ if (other.hasRateLimitInfo()) {
+ mergeRateLimitInfo(other.getRateLimitInfo());
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -1388,6 +1484,12 @@ public Builder mergeFrom(
}
break;
} // case 10
+ case 26:
+ {
+ input.readMessage(getRateLimitInfoFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1758,6 +1860,207 @@ public com.google.bigtable.v2.MutateRowsResponse.Entry.Builder addEntriesBuilder
return entriesBuilder_;
}
+ private com.google.bigtable.v2.RateLimitInfo rateLimitInfo_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.bigtable.v2.RateLimitInfo,
+ com.google.bigtable.v2.RateLimitInfo.Builder,
+ com.google.bigtable.v2.RateLimitInfoOrBuilder>
+ rateLimitInfoBuilder_;
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return Whether the rateLimitInfo field is set.
+ */
+ public boolean hasRateLimitInfo() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return The rateLimitInfo.
+ */
+ public com.google.bigtable.v2.RateLimitInfo getRateLimitInfo() {
+ if (rateLimitInfoBuilder_ == null) {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ } else {
+ return rateLimitInfoBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) {
+ if (rateLimitInfoBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ rateLimitInfo_ = value;
+ } else {
+ rateLimitInfoBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder setRateLimitInfo(com.google.bigtable.v2.RateLimitInfo.Builder builderForValue) {
+ if (rateLimitInfoBuilder_ == null) {
+ rateLimitInfo_ = builderForValue.build();
+ } else {
+ rateLimitInfoBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder mergeRateLimitInfo(com.google.bigtable.v2.RateLimitInfo value) {
+ if (rateLimitInfoBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && rateLimitInfo_ != null
+ && rateLimitInfo_ != com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()) {
+ getRateLimitInfoBuilder().mergeFrom(value);
+ } else {
+ rateLimitInfo_ = value;
+ }
+ } else {
+ rateLimitInfoBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public Builder clearRateLimitInfo() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ rateLimitInfo_ = null;
+ if (rateLimitInfoBuilder_ != null) {
+ rateLimitInfoBuilder_.dispose();
+ rateLimitInfoBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public com.google.bigtable.v2.RateLimitInfo.Builder getRateLimitInfoBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getRateLimitInfoFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ public com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder() {
+ if (rateLimitInfoBuilder_ != null) {
+ return rateLimitInfoBuilder_.getMessageOrBuilder();
+ } else {
+ return rateLimitInfo_ == null
+ ? com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()
+ : rateLimitInfo_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.bigtable.v2.RateLimitInfo,
+ com.google.bigtable.v2.RateLimitInfo.Builder,
+ com.google.bigtable.v2.RateLimitInfoOrBuilder>
+ getRateLimitInfoFieldBuilder() {
+ if (rateLimitInfoBuilder_ == null) {
+ rateLimitInfoBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.bigtable.v2.RateLimitInfo,
+ com.google.bigtable.v2.RateLimitInfo.Builder,
+ com.google.bigtable.v2.RateLimitInfoOrBuilder>(
+ getRateLimitInfo(), getParentForChildren(), isClean());
+ rateLimitInfo_ = null;
+ }
+ return rateLimitInfoBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java
index ca4b764ba7..8afab73c07 100644
--- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/MutateRowsResponseOrBuilder.java
@@ -74,4 +74,45 @@ public interface MutateRowsResponseOrBuilder
* repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1;
*/
com.google.bigtable.v2.MutateRowsResponse.EntryOrBuilder getEntriesOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return Whether the rateLimitInfo field is set.
+ */
+ boolean hasRateLimitInfo();
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ *
+ * @return The rateLimitInfo.
+ */
+ com.google.bigtable.v2.RateLimitInfo getRateLimitInfo();
+ /**
+ *
+ *
+ *
+ * Information about how client should limit the rate (QPS). Primirily used by
+ * supported official Cloud Bigtable clients. If unset, the rate limit info is
+ * not provided by the server.
+ *
+ *
+ * optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3;
+ */
+ com.google.bigtable.v2.RateLimitInfoOrBuilder getRateLimitInfoOrBuilder();
}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java
new file mode 100644
index 0000000000..f3826c4adf
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfo.java
@@ -0,0 +1,882 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/bigtable/v2/bigtable.proto
+
+package com.google.bigtable.v2;
+
+/**
+ *
+ *
+ *
+ * Information about how client should adjust the load to Bigtable.
+ *
+ *
+ * Protobuf type {@code google.bigtable.v2.RateLimitInfo}
+ */
+public final class RateLimitInfo extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.bigtable.v2.RateLimitInfo)
+ RateLimitInfoOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use RateLimitInfo.newBuilder() to construct.
+ private RateLimitInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private RateLimitInfo() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new RateLimitInfo();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.bigtable.v2.BigtableProto
+ .internal_static_google_bigtable_v2_RateLimitInfo_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.bigtable.v2.BigtableProto
+ .internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.bigtable.v2.RateLimitInfo.class,
+ com.google.bigtable.v2.RateLimitInfo.Builder.class);
+ }
+
+ public static final int PERIOD_FIELD_NUMBER = 1;
+ private com.google.protobuf.Duration period_;
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ *
+ * @return Whether the period field is set.
+ */
+ @java.lang.Override
+ public boolean hasPeriod() {
+ return period_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ *
+ * @return The period.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getPeriod() {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ }
+
+ public static final int FACTOR_FIELD_NUMBER = 2;
+ private double factor_ = 0D;
+ /**
+ *
+ *
+ *
+ * If it has been at least one `period` since the last load adjustment, the
+ * client should multiply the current load by this value to get the new target
+ * load. For example, if the current load is 100 and `factor` is 0.8, the new
+ * target load should be 80. After adjusting, the client should ignore
+ * `factor` until another `period` has passed.
+ * The client can measure its load using any unit that's comparable over time
+ * For example, QPS can be used as long as each request involves a similar
+ * amount of work.
+ *
+ *
+ * double factor = 2;
+ *
+ * @return The factor.
+ */
+ @java.lang.Override
+ public double getFactor() {
+ return factor_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (period_ != null) {
+ output.writeMessage(1, getPeriod());
+ }
+ if (java.lang.Double.doubleToRawLongBits(factor_) != 0) {
+ output.writeDouble(2, factor_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (period_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPeriod());
+ }
+ if (java.lang.Double.doubleToRawLongBits(factor_) != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, factor_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.bigtable.v2.RateLimitInfo)) {
+ return super.equals(obj);
+ }
+ com.google.bigtable.v2.RateLimitInfo other = (com.google.bigtable.v2.RateLimitInfo) obj;
+
+ if (hasPeriod() != other.hasPeriod()) return false;
+ if (hasPeriod()) {
+ if (!getPeriod().equals(other.getPeriod())) return false;
+ }
+ if (java.lang.Double.doubleToLongBits(getFactor())
+ != java.lang.Double.doubleToLongBits(other.getFactor())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasPeriod()) {
+ hash = (37 * hash) + PERIOD_FIELD_NUMBER;
+ hash = (53 * hash) + getPeriod().hashCode();
+ }
+ hash = (37 * hash) + FACTOR_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getFactor()));
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.bigtable.v2.RateLimitInfo prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Information about how client should adjust the load to Bigtable.
+ *
+ *
+ * Protobuf type {@code google.bigtable.v2.RateLimitInfo}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.bigtable.v2.RateLimitInfo)
+ com.google.bigtable.v2.RateLimitInfoOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.bigtable.v2.BigtableProto
+ .internal_static_google_bigtable_v2_RateLimitInfo_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.bigtable.v2.BigtableProto
+ .internal_static_google_bigtable_v2_RateLimitInfo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.bigtable.v2.RateLimitInfo.class,
+ com.google.bigtable.v2.RateLimitInfo.Builder.class);
+ }
+
+ // Construct using com.google.bigtable.v2.RateLimitInfo.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ period_ = null;
+ if (periodBuilder_ != null) {
+ periodBuilder_.dispose();
+ periodBuilder_ = null;
+ }
+ factor_ = 0D;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.bigtable.v2.BigtableProto
+ .internal_static_google_bigtable_v2_RateLimitInfo_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfo getDefaultInstanceForType() {
+ return com.google.bigtable.v2.RateLimitInfo.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfo build() {
+ com.google.bigtable.v2.RateLimitInfo result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfo buildPartial() {
+ com.google.bigtable.v2.RateLimitInfo result = new com.google.bigtable.v2.RateLimitInfo(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(com.google.bigtable.v2.RateLimitInfo result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.period_ = periodBuilder_ == null ? period_ : periodBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.factor_ = factor_;
+ }
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.bigtable.v2.RateLimitInfo) {
+ return mergeFrom((com.google.bigtable.v2.RateLimitInfo) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.bigtable.v2.RateLimitInfo other) {
+ if (other == com.google.bigtable.v2.RateLimitInfo.getDefaultInstance()) return this;
+ if (other.hasPeriod()) {
+ mergePeriod(other.getPeriod());
+ }
+ if (other.getFactor() != 0D) {
+ setFactor(other.getFactor());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ input.readMessage(getPeriodFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 17:
+ {
+ factor_ = input.readDouble();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 17
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.unwrapIOException();
+ } finally {
+ onChanged();
+ } // finally
+ return this;
+ }
+
+ private int bitField0_;
+
+ private com.google.protobuf.Duration period_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ periodBuilder_;
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ *
+ * @return Whether the period field is set.
+ */
+ public boolean hasPeriod() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ *
+ * @return The period.
+ */
+ public com.google.protobuf.Duration getPeriod() {
+ if (periodBuilder_ == null) {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ } else {
+ return periodBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ public Builder setPeriod(com.google.protobuf.Duration value) {
+ if (periodBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ period_ = value;
+ } else {
+ periodBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ public Builder setPeriod(com.google.protobuf.Duration.Builder builderForValue) {
+ if (periodBuilder_ == null) {
+ period_ = builderForValue.build();
+ } else {
+ periodBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ public Builder mergePeriod(com.google.protobuf.Duration value) {
+ if (periodBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && period_ != null
+ && period_ != com.google.protobuf.Duration.getDefaultInstance()) {
+ getPeriodBuilder().mergeFrom(value);
+ } else {
+ period_ = value;
+ }
+ } else {
+ periodBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ public Builder clearPeriod() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ period_ = null;
+ if (periodBuilder_ != null) {
+ periodBuilder_.dispose();
+ periodBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ public com.google.protobuf.Duration.Builder getPeriodBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getPeriodFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
+ if (periodBuilder_ != null) {
+ return periodBuilder_.getMessageOrBuilder();
+ } else {
+ return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getPeriodFieldBuilder() {
+ if (periodBuilder_ == null) {
+ periodBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getPeriod(), getParentForChildren(), isClean());
+ period_ = null;
+ }
+ return periodBuilder_;
+ }
+
+ private double factor_;
+ /**
+ *
+ *
+ *
+ * If it has been at least one `period` since the last load adjustment, the
+ * client should multiply the current load by this value to get the new target
+ * load. For example, if the current load is 100 and `factor` is 0.8, the new
+ * target load should be 80. After adjusting, the client should ignore
+ * `factor` until another `period` has passed.
+ * The client can measure its load using any unit that's comparable over time
+ * For example, QPS can be used as long as each request involves a similar
+ * amount of work.
+ *
+ *
+ * double factor = 2;
+ *
+ * @return The factor.
+ */
+ @java.lang.Override
+ public double getFactor() {
+ return factor_;
+ }
+ /**
+ *
+ *
+ *
+ * If it has been at least one `period` since the last load adjustment, the
+ * client should multiply the current load by this value to get the new target
+ * load. For example, if the current load is 100 and `factor` is 0.8, the new
+ * target load should be 80. After adjusting, the client should ignore
+ * `factor` until another `period` has passed.
+ * The client can measure its load using any unit that's comparable over time
+ * For example, QPS can be used as long as each request involves a similar
+ * amount of work.
+ *
+ *
+ * double factor = 2;
+ *
+ * @param value The factor to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFactor(double value) {
+
+ factor_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * If it has been at least one `period` since the last load adjustment, the
+ * client should multiply the current load by this value to get the new target
+ * load. For example, if the current load is 100 and `factor` is 0.8, the new
+ * target load should be 80. After adjusting, the client should ignore
+ * `factor` until another `period` has passed.
+ * The client can measure its load using any unit that's comparable over time
+ * For example, QPS can be used as long as each request involves a similar
+ * amount of work.
+ *
+ *
+ * double factor = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFactor() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ factor_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.bigtable.v2.RateLimitInfo)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.bigtable.v2.RateLimitInfo)
+ private static final com.google.bigtable.v2.RateLimitInfo DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.bigtable.v2.RateLimitInfo();
+ }
+
+ public static com.google.bigtable.v2.RateLimitInfo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public RateLimitInfo parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.bigtable.v2.RateLimitInfo getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java
new file mode 100644
index 0000000000..a75e6ab15f
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/RateLimitInfoOrBuilder.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2020 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.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/bigtable/v2/bigtable.proto
+
+package com.google.bigtable.v2;
+
+public interface RateLimitInfoOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.bigtable.v2.RateLimitInfo)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ *
+ * @return Whether the period field is set.
+ */
+ boolean hasPeriod();
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ *
+ * @return The period.
+ */
+ com.google.protobuf.Duration getPeriod();
+ /**
+ *
+ *
+ *
+ * Time that clients should wait before adjusting the target rate again.
+ * If clients adjust rate too frequently, the impact of the previous
+ * adjustment may not have been taken into account and may
+ * over-throttle or under-throttle. If clients adjust rate too slowly, they
+ * will not be responsive to load changes on server side, and may
+ * over-throttle or under-throttle.
+ *
+ *
+ * .google.protobuf.Duration period = 1;
+ */
+ com.google.protobuf.DurationOrBuilder getPeriodOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * If it has been at least one `period` since the last load adjustment, the
+ * client should multiply the current load by this value to get the new target
+ * load. For example, if the current load is 100 and `factor` is 0.8, the new
+ * target load should be 80. After adjusting, the client should ignore
+ * `factor` until another `period` has passed.
+ * The client can measure its load using any unit that's comparable over time
+ * For example, QPS can be used as long as each request involves a similar
+ * amount of work.
+ *
+ *
+ * double factor = 2;
+ *
+ * @return The factor.
+ */
+ double getFactor();
+}
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java
index 00e8124f77..9eda7db192 100644
--- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequest.java
@@ -300,8 +300,8 @@ public com.google.protobuf.ByteString getTableNameBytes() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -324,8 +324,8 @@ public java.lang.String getAppProfileId() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1104,8 +1104,8 @@ public Builder setTableNameBytes(com.google.protobuf.ByteString value) {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1127,8 +1127,8 @@ public java.lang.String getAppProfileId() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1150,8 +1150,8 @@ public com.google.protobuf.ByteString getAppProfileIdBytes() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1172,8 +1172,8 @@ public Builder setAppProfileId(java.lang.String value) {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -1190,8 +1190,8 @@ public Builder clearAppProfileId() {
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
diff --git a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java
index 2b2e969f06..ed43da6171 100644
--- a/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java
+++ b/proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/ReadRowsRequestOrBuilder.java
@@ -60,8 +60,8 @@ public interface ReadRowsRequestOrBuilder
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
@@ -73,8 +73,8 @@ public interface ReadRowsRequestOrBuilder
*
*
*
- * This value specifies routing for replication. This API only accepts the
- * empty value of app_profile_id.
+ * This value specifies routing for replication. If not specified, the
+ * "default" application profile will be used.
*
*
* string app_profile_id = 5;
diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto
index 098d17e3e7..8624833ade 100644
--- a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto
+++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/bigtable.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -227,7 +227,6 @@ service Bigtable {
// Request message for Bigtable.ReadRows.
message ReadRowsRequest {
- //
// The desired view into RequestStats that should be returned in the response.
//
// See also: RequestStats message.
@@ -254,8 +253,8 @@ message ReadRowsRequest {
}
];
- // This value specifies routing for replication. This API only accepts the
- // empty value of app_profile_id.
+ // This value specifies routing for replication. If not specified, the
+ // "default" application profile will be used.
string app_profile_id = 5;
// The row keys and/or ranges to read sequentially. If not specified, reads
@@ -489,6 +488,33 @@ message MutateRowsResponse {
// One or more results for Entries from the batch request.
repeated Entry entries = 1;
+
+ // Information about how client should limit the rate (QPS). Primirily used by
+ // supported official Cloud Bigtable clients. If unset, the rate limit info is
+ // not provided by the server.
+ optional RateLimitInfo rate_limit_info = 3;
+}
+
+// Information about how client should adjust the load to Bigtable.
+message RateLimitInfo {
+ // Time that clients should wait before adjusting the target rate again.
+ // If clients adjust rate too frequently, the impact of the previous
+ // adjustment may not have been taken into account and may
+ // over-throttle or under-throttle. If clients adjust rate too slowly, they
+ // will not be responsive to load changes on server side, and may
+ // over-throttle or under-throttle.
+ google.protobuf.Duration period = 1;
+
+ // If it has been at least one `period` since the last load adjustment, the
+ // client should multiply the current load by this value to get the new target
+ // load. For example, if the current load is 100 and `factor` is 0.8, the new
+ // target load should be 80. After adjusting, the client should ignore
+ // `factor` until another `period` has passed.
+ //
+ // The client can measure its load using any unit that's comparable over time
+ // For example, QPS can be used as long as each request involves a similar
+ // amount of work.
+ double factor = 2;
}
// Request message for Bigtable.CheckAndMutateRow.
diff --git a/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto
new file mode 100644
index 0000000000..ba10707a3f
--- /dev/null
+++ b/proto-google-cloud-bigtable-v2/src/main/proto/google/bigtable/v2/feature_flags.proto
@@ -0,0 +1,39 @@
+// Copyright 2023 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
+//
+// http://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.
+
+syntax = "proto3";
+
+package google.bigtable.v2;
+
+option csharp_namespace = "Google.Cloud.Bigtable.V2";
+option go_package = "google.golang.org/genproto/googleapis/bigtable/v2;bigtable";
+option java_multiple_files = true;
+option java_outer_classname = "FeatureFlagsProto";
+option java_package = "com.google.bigtable.v2";
+option php_namespace = "Google\\Cloud\\Bigtable\\V2";
+option ruby_package = "Google::Cloud::Bigtable::V2";
+
+// Feature flags supported by a client.
+// This is intended to be sent as part of request metadata to assure the server
+// that certain behaviors are safe to enable. This proto is meant to be
+// serialized and websafe-base64 encoded under the `bigtable-features` metadata
+// key. The value will remain constant for the lifetime of a client and due to
+// HTTP2's HPACK compression, the request overhead will be tiny.
+// This is an internal implementation detail and should not be used by endusers
+// directly.
+message FeatureFlags {
+ // Notify the server that the client enables batch write flow control by
+ // requesting RateLimitInfo from MutateRowsResponse.
+ bool mutate_rows_rate_limit = 3;
+}
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 354107c3a8..3d7571294b 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
com.google.cloud
google-cloud-bigtable
- 2.20.4
+ 2.21.0
diff --git a/samples/native-image-sample/pom.xml b/samples/native-image-sample/pom.xml
index 1318ce96c0..6f248834a9 100644
--- a/samples/native-image-sample/pom.xml
+++ b/samples/native-image-sample/pom.xml
@@ -83,7 +83,7 @@
org.junit.vintage
junit-vintage-engine
- 5.9.2
+ 5.9.3
test
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index cdf808ec57..76bd45f094 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
com.google.cloud
google-cloud-bigtable
- 2.21.0
+ 2.22.0
diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml
index 60dd865c01..530e5b0a3f 100644
--- a/test-proxy/pom.xml
+++ b/test-proxy/pom.xml
@@ -12,11 +12,11 @@
google-cloud-bigtable-parent
com.google.cloud
- 2.21.0
+ 2.22.0
- 2.21.0
+ 2.22.0
@@ -71,7 +71,7 @@
protobuf-maven-plugin
0.6.1
- com.google.protobuf:protoc:3.9.0:exe:${os.detected.classifier}
+ com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}
grpc-java
io.grpc:protoc-gen-grpc-java:1.24.0:exe:${os.detected.classifier}
diff --git a/versions.txt b/versions.txt
index b3403f558e..9ccdba9a7e 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,10 +1,10 @@
# Format:
# module:released-version:current-version
-google-cloud-bigtable:2.21.0:2.21.0
-grpc-google-cloud-bigtable-admin-v2:2.21.0:2.21.0
-grpc-google-cloud-bigtable-v2:2.21.0:2.21.0
-proto-google-cloud-bigtable-admin-v2:2.21.0:2.21.0
-proto-google-cloud-bigtable-v2:2.21.0:2.21.0
-google-cloud-bigtable-emulator:0.158.0:0.158.0
-google-cloud-bigtable-emulator-core:2.21.0:2.21.0
+google-cloud-bigtable:2.22.0:2.22.0
+grpc-google-cloud-bigtable-admin-v2:2.22.0:2.22.0
+grpc-google-cloud-bigtable-v2:2.22.0:2.22.0
+proto-google-cloud-bigtable-admin-v2:2.22.0:2.22.0
+proto-google-cloud-bigtable-v2:2.22.0:2.22.0
+google-cloud-bigtable-emulator:0.159.0:0.159.0
+google-cloud-bigtable-emulator-core:2.22.0:2.22.0