Skip to content

Commit

Permalink
feat: add last_scanned_row_key feature (#1856)
Browse files Browse the repository at this point in the history
* feat: add last_scanned_row_key feature

PiperOrigin-RevId: 551191182

Source-Link: googleapis/googleapis@51e04ba

Source-Link: googleapis/googleapis-gen@4b90e8e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGI5MGU4ZWFkNDQ3N2VmZjk2YzMxYjliMGZkZWYzNmVkOTc1YjE1ZiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jul 26, 2023
1 parent a78a194 commit ef30dde
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 8 deletions.
Expand Up @@ -105,6 +105,25 @@ public boolean getMutateRowsRateLimit() {
return mutateRowsRateLimit_;
}

public static final int LAST_SCANNED_ROW_RESPONSES_FIELD_NUMBER = 4;
private boolean lastScannedRowResponses_ = false;
/**
*
*
* <pre>
* Notify the server that the client supports the last_scanned_row field
* in ReadRowsResponse for long-running sparse scans.
* </pre>
*
* <code>bool last_scanned_row_responses = 4;</code>
*
* @return The lastScannedRowResponses.
*/
@java.lang.Override
public boolean getLastScannedRowResponses() {
return lastScannedRowResponses_;
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand All @@ -125,6 +144,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (mutateRowsRateLimit_ != false) {
output.writeBool(3, mutateRowsRateLimit_);
}
if (lastScannedRowResponses_ != false) {
output.writeBool(4, lastScannedRowResponses_);
}
getUnknownFields().writeTo(output);
}

Expand All @@ -140,6 +162,9 @@ public int getSerializedSize() {
if (mutateRowsRateLimit_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, mutateRowsRateLimit_);
}
if (lastScannedRowResponses_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, lastScannedRowResponses_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -157,6 +182,7 @@ public boolean equals(final java.lang.Object obj) {

if (getReverseScans() != other.getReverseScans()) return false;
if (getMutateRowsRateLimit() != other.getMutateRowsRateLimit()) return false;
if (getLastScannedRowResponses() != other.getLastScannedRowResponses()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
Expand All @@ -172,6 +198,8 @@ public int hashCode() {
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReverseScans());
hash = (37 * hash) + MUTATE_ROWS_RATE_LIMIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMutateRowsRateLimit());
hash = (37 * hash) + LAST_SCANNED_ROW_RESPONSES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getLastScannedRowResponses());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
Expand Down Expand Up @@ -319,6 +347,7 @@ public Builder clear() {
bitField0_ = 0;
reverseScans_ = false;
mutateRowsRateLimit_ = false;
lastScannedRowResponses_ = false;
return this;
}

Expand Down Expand Up @@ -360,6 +389,9 @@ private void buildPartial0(com.google.bigtable.v2.FeatureFlags result) {
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mutateRowsRateLimit_ = mutateRowsRateLimit_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.lastScannedRowResponses_ = lastScannedRowResponses_;
}
}

@java.lang.Override
Expand Down Expand Up @@ -413,6 +445,9 @@ public Builder mergeFrom(com.google.bigtable.v2.FeatureFlags other) {
if (other.getMutateRowsRateLimit() != false) {
setMutateRowsRateLimit(other.getMutateRowsRateLimit());
}
if (other.getLastScannedRowResponses() != false) {
setLastScannedRowResponses(other.getLastScannedRowResponses());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
Expand Down Expand Up @@ -451,6 +486,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000002;
break;
} // case 24
case 32:
{
lastScannedRowResponses_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 32
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -582,6 +623,62 @@ public Builder clearMutateRowsRateLimit() {
return this;
}

private boolean lastScannedRowResponses_;
/**
*
*
* <pre>
* Notify the server that the client supports the last_scanned_row field
* in ReadRowsResponse for long-running sparse scans.
* </pre>
*
* <code>bool last_scanned_row_responses = 4;</code>
*
* @return The lastScannedRowResponses.
*/
@java.lang.Override
public boolean getLastScannedRowResponses() {
return lastScannedRowResponses_;
}
/**
*
*
* <pre>
* Notify the server that the client supports the last_scanned_row field
* in ReadRowsResponse for long-running sparse scans.
* </pre>
*
* <code>bool last_scanned_row_responses = 4;</code>
*
* @param value The lastScannedRowResponses to set.
* @return This builder for chaining.
*/
public Builder setLastScannedRowResponses(boolean value) {

lastScannedRowResponses_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
* <pre>
* Notify the server that the client supports the last_scanned_row field
* in ReadRowsResponse for long-running sparse scans.
* </pre>
*
* <code>bool last_scanned_row_responses = 4;</code>
*
* @return This builder for chaining.
*/
public Builder clearLastScannedRowResponses() {
bitField0_ = (bitField0_ & ~0x00000004);
lastScannedRowResponses_ = false;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Expand Up @@ -50,4 +50,18 @@ public interface FeatureFlagsOrBuilder
* @return The mutateRowsRateLimit.
*/
boolean getMutateRowsRateLimit();

/**
*
*
* <pre>
* Notify the server that the client supports the last_scanned_row field
* in ReadRowsResponse for long-running sparse scans.
* </pre>
*
* <code>bool last_scanned_row_responses = 4;</code>
*
* @return The lastScannedRowResponses.
*/
boolean getLastScannedRowResponses();
}
Expand Up @@ -41,14 +41,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
static {
java.lang.String[] descriptorData = {
"\n&google/bigtable/v2/feature_flags.proto"
+ "\022\022google.bigtable.v2\"E\n\014FeatureFlags\022\025\n\r"
+ "\022\022google.bigtable.v2\"i\n\014FeatureFlags\022\025\n\r"
+ "reverse_scans\030\001 \001(\010\022\036\n\026mutate_rows_rate_"
+ "limit\030\003 \001(\010B\275\001\n\026com.google.bigtable.v2B\021"
+ "FeatureFlagsProtoP\001Z:google.golang.org/g"
+ "enproto/googleapis/bigtable/v2;bigtable\252"
+ "\002\030Google.Cloud.Bigtable.V2\312\002\030Google\\Clou"
+ "d\\Bigtable\\V2\352\002\033Google::Cloud::Bigtable:"
+ ":V2b\006proto3"
+ "limit\030\003 \001(\010\022\"\n\032last_scanned_row_response"
+ "s\030\004 \001(\010B\275\001\n\026com.google.bigtable.v2B\021Feat"
+ "ureFlagsProtoP\001Z:google.golang.org/genpr"
+ "oto/googleapis/bigtable/v2;bigtable\252\002\030Go"
+ "ogle.Cloud.Bigtable.V2\312\002\030Google\\Cloud\\Bi"
+ "gtable\\V2\352\002\033Google::Cloud::Bigtable::V2b"
+ "\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand All @@ -59,7 +60,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_bigtable_v2_FeatureFlags_descriptor,
new java.lang.String[] {
"ReverseScans", "MutateRowsRateLimit",
"ReverseScans", "MutateRowsRateLimit", "LastScannedRowResponses",
});
}

Expand Down
Expand Up @@ -40,4 +40,8 @@ message FeatureFlags {
// Notify the server that the client enables batch write flow control by
// requesting RateLimitInfo from MutateRowsResponse.
bool mutate_rows_rate_limit = 3;

// Notify the server that the client supports the last_scanned_row field
// in ReadRowsResponse for long-running sparse scans.
bool last_scanned_row_responses = 4;
}

0 comments on commit ef30dde

Please sign in to comment.