Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add last_scanned_row_key feature #1856

Merged
merged 2 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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();
}
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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;
}