Skip to content

Commit

Permalink
feat: Added SuggestConversationSummary RPC (#1182)
Browse files Browse the repository at this point in the history
* feat: remove proto ReadEfficiencyStats
feat: remove field RequestStats.read_efficiency_stats
feat: rename proto AllReadStats to FullReadStatsView
feat: rename field RequestStats.all_read_stats to full_read_stats_view
feat: rename proto ReadIteratorStats to ReadIterationStats
feat: remove enum value ReadRowsRequest.RequestStatsView.REQUEST_STATS_EFFICIENCY
feat: remove field ReadIterationStats.deletes_seen

PiperOrigin-RevId: 479370243

Source-Link: googleapis/googleapis@959d789

Source-Link: googleapis/googleapis-gen@38b4252
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzhiNDI1MjY0YzAzZjNjZGNhMjc5NTAzYzgwMWM4NjYwNGM4YTY3YSJ9

* 🦉 Updates from OwlBot post-processor

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

* chore: Enable requesting numeric enums in "transport=rest" responses for services supporting this (Java, Go, Python, PHP, TypeScript, C#, and Ruby), even if they do not yet turn on REST transport

chore: disallow "transport=rest" for services where numeric enums are not confirmed to be supported (except in PHP and Java)
PiperOrigin-RevId: 493113566

Source-Link: googleapis/googleapis@758f0d1

Source-Link: googleapis/googleapis-gen@78bd8f0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzhiZDhmMDVlMTI3NjM2M2ViMTRlYWU3MGU5MWZlNGJjMjA3MDNhYiJ9

* 🦉 Updates from OwlBot post-processor

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

* 🦉 Updates from OwlBot post-processor

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

* feat: Added SuggestConversationSummary RPC
docs: updated go library package

PiperOrigin-RevId: 501862436

Source-Link: googleapis/googleapis@155e0f4

Source-Link: googleapis/googleapis-gen@3051f61
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MWY2MTdhOTkxYzI3NGM4OGQyNzA2NGU4MDMwOTVlNGVmOWQzOSJ9

* 🦉 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>
Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com>
Co-authored-by: danieljbruce <danieljbruce@users.noreply.github.com>
  • Loading branch information
4 people committed Jan 31, 2023
1 parent 289aa11 commit 355925e
Show file tree
Hide file tree
Showing 68 changed files with 452 additions and 901 deletions.
4 changes: 2 additions & 2 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2022 Google LLC',
copyright: 'Copyright 2023 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/bigtable',
Expand Down
108 changes: 56 additions & 52 deletions protos/google/bigtable/v2/bigtable.proto
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ service Bigtable {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) = "table_name";
option (google.api.method_signature) = "table_name,app_profile_id";
Expand All @@ -78,8 +80,7 @@ service Bigtable {
// delimit contiguous sections of the table of approximately equal size,
// which can be used to break up the data for distributed tasks like
// mapreduces.
rpc SampleRowKeys(SampleRowKeysRequest)
returns (stream SampleRowKeysResponse) {
rpc SampleRowKeys(SampleRowKeysRequest) returns (stream SampleRowKeysResponse) {
option (google.api.http) = {
get: "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys"
};
Expand All @@ -88,7 +89,9 @@ service Bigtable {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) = "table_name";
option (google.api.method_signature) = "table_name,app_profile_id";
Expand All @@ -106,11 +109,12 @@ service Bigtable {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) = "table_name,row_key,mutations";
option (google.api.method_signature) =
"table_name,row_key,mutations,app_profile_id";
option (google.api.method_signature) = "table_name,row_key,mutations,app_profile_id";
}

// Mutates multiple rows in a batch. Each individual row is mutated
Expand All @@ -126,15 +130,16 @@ service Bigtable {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) = "table_name,entries";
option (google.api.method_signature) = "table_name,entries,app_profile_id";
}

// Mutates a row atomically based on the output of a predicate Reader filter.
rpc CheckAndMutateRow(CheckAndMutateRowRequest)
returns (CheckAndMutateRowResponse) {
rpc CheckAndMutateRow(CheckAndMutateRowRequest) returns (CheckAndMutateRowResponse) {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow"
body: "*"
Expand All @@ -144,12 +149,12 @@ service Bigtable {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) =
"table_name,row_key,predicate_filter,true_mutations,false_mutations";
option (google.api.method_signature) =
"table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id";
option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations";
option (google.api.method_signature) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id";
}

// Warm up associated instance metadata for this connection.
Expand All @@ -164,7 +169,9 @@ service Bigtable {
field: "name"
path_template: "{name=projects/*/instances/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) = "name";
option (google.api.method_signature) = "name,app_profile_id";
Expand All @@ -175,8 +182,7 @@ service Bigtable {
// entry based on pre-defined read/modify/write rules. The new value for the
// timestamp is the greater of the existing timestamp or the current server
// time. The method returns the new contents of all modified cells.
rpc ReadModifyWriteRow(ReadModifyWriteRowRequest)
returns (ReadModifyWriteRowResponse) {
rpc ReadModifyWriteRow(ReadModifyWriteRowRequest) returns (ReadModifyWriteRowResponse) {
option (google.api.http) = {
post: "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow"
body: "*"
Expand All @@ -186,11 +192,12 @@ service Bigtable {
field: "table_name"
path_template: "{table_name=projects/*/instances/*/tables/*}"
}
routing_parameters { field: "app_profile_id" }
routing_parameters {
field: "app_profile_id"
}
};
option (google.api.method_signature) = "table_name,row_key,rules";
option (google.api.method_signature) =
"table_name,row_key,rules,app_profile_id";
option (google.api.method_signature) = "table_name,row_key,rules,app_profile_id";
}
}

Expand All @@ -208,12 +215,9 @@ message ReadRowsRequest {
// RequestStats embedded message unset in the response.
REQUEST_STATS_NONE = 1;

// Include stats related to the efficiency of the read.
REQUEST_STATS_EFFICIENCY = 2;

// Include the full set of available RequestStats in the response,
// applicable to this read.
REQUEST_STATS_FULL = 3;
REQUEST_STATS_FULL = 2;
}

// Required. The unique name of the table from which to read.
Expand Down Expand Up @@ -384,8 +388,8 @@ message SampleRowKeysResponse {

// Request message for Bigtable.MutateRow.
message MutateRowRequest {
// Required. The unique name of the table to which the mutation should be
// applied. Values are of the form
// Required. The unique name of the table to which the mutation should be applied.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
Expand All @@ -401,14 +405,16 @@ message MutateRowRequest {
// Required. The key of the row to which the mutation should be applied.
bytes row_key = 2 [(google.api.field_behavior) = REQUIRED];

// Required. Changes to be atomically applied to the specified row. Entries
// are applied in order, meaning that earlier mutations can be masked by later
// ones. Must contain at least one entry and at most 100000.
// Required. Changes to be atomically applied to the specified row. Entries are applied
// in order, meaning that earlier mutations can be masked by later ones.
// Must contain at least one entry and at most 100000.
repeated Mutation mutations = 3 [(google.api.field_behavior) = REQUIRED];
}

// Response message for Bigtable.MutateRow.
message MutateRowResponse {}
message MutateRowResponse {

}

// Request message for BigtableService.MutateRows.
message MutateRowsRequest {
Expand All @@ -417,14 +423,14 @@ message MutateRowsRequest {
// The key of the row to which the `mutations` should be applied.
bytes row_key = 1;

// Required. Changes to be atomically applied to the specified row.
// Mutations are applied in order, meaning that earlier mutations can be
// masked by later ones. You must specify at least one mutation.
// Required. Changes to be atomically applied to the specified row. Mutations are
// applied in order, meaning that earlier mutations can be masked by
// later ones.
// You must specify at least one mutation.
repeated Mutation mutations = 2 [(google.api.field_behavior) = REQUIRED];
}

// Required. The unique name of the table to which the mutations should be
// applied.
// Required. The unique name of the table to which the mutations should be applied.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down Expand Up @@ -465,8 +471,9 @@ message MutateRowsResponse {

// Request message for Bigtable.CheckAndMutateRow.
message CheckAndMutateRowRequest {
// Required. The unique name of the table to which the conditional mutation
// should be applied. Values are of the form
// Required. The unique name of the table to which the conditional mutation should be
// applied.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
Expand All @@ -479,8 +486,7 @@ message CheckAndMutateRowRequest {
// "default" application profile will be used.
string app_profile_id = 7;

// Required. The key of the row to which the conditional mutation should be
// applied.
// Required. The key of the row to which the conditional mutation should be applied.
bytes row_key = 2 [(google.api.field_behavior) = REQUIRED];

// The filter to be applied to the contents of the specified row. Depending
Expand Down Expand Up @@ -513,9 +519,8 @@ message CheckAndMutateRowResponse {

// Request message for client connection keep-alive and warming.
message PingAndWarmRequest {
// Required. The unique name of the instance to check permissions for as well
// as respond. Values are of the form
// `projects/<project>/instances/<instance>`.
// Required. The unique name of the instance to check permissions for as well as
// respond. Values are of the form `projects/<project>/instances/<instance>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand All @@ -533,8 +538,9 @@ message PingAndWarmResponse {}

// Request message for Bigtable.ReadModifyWriteRow.
message ReadModifyWriteRowRequest {
// Required. The unique name of the table to which the read/modify/write rules
// should be applied. Values are of the form
// Required. The unique name of the table to which the read/modify/write rules should be
// applied.
// Values are of the form
// `projects/<project>/instances/<instance>/tables/<table>`.
string table_name = 1 [
(google.api.field_behavior) = REQUIRED,
Expand All @@ -547,15 +553,13 @@ message ReadModifyWriteRowRequest {
// "default" application profile will be used.
string app_profile_id = 4;

// Required. The key of the row to which the read/modify/write rules should be
// applied.
// Required. The key of the row to which the read/modify/write rules should be applied.
bytes row_key = 2 [(google.api.field_behavior) = REQUIRED];

// Required. Rules specifying how the specified row's contents are to be
// transformed into writes. Entries are applied in order, meaning that earlier
// rules will affect the results of later ones.
repeated ReadModifyWriteRule rules = 3
[(google.api.field_behavior) = REQUIRED];
// Required. Rules specifying how the specified row's contents are to be transformed
// into writes. Entries are applied in order, meaning that earlier rules will
// affect the results of later ones.
repeated ReadModifyWriteRule rules = 3 [(google.api.field_behavior) = REQUIRED];
}

// Response message for Bigtable.ReadModifyWriteRow.
Expand Down
56 changes: 26 additions & 30 deletions protos/google/bigtable/v2/request_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,23 @@ option php_namespace = "Google\\Cloud\\Bigtable\\V2";
option ruby_package = "Google::Cloud::Bigtable::V2";

//
// Messages related to RequestStats, part of the Slow Queries feature, that can
// Messages related to RequestStats, part of the Query Stats feature, that can
// help understand the performance of requests.

// ReadIteratorStats captures information about the iteration of rows or cells
//
// The layout of requests below is as follows:
// * RequestStats serves as the top-level container for statistics and
// measures related to Bigtable requests. This common object is returned as
// part of methods in the Data API.
// * RequestStats contains multiple *views* of related data, chosen by an
// option in the source Data API method. The view that is returned is
// designed to have all submessages (and their submessages, and so on)
// filled-in, to provide a comprehensive selection of statistics and
// measures related to the requested view.

// ReadIterationStats captures information about the iteration of rows or cells
// over the course of a read, e.g. how many results were scanned in a read
// operation versus the results returned.
message ReadIteratorStats {
message ReadIterationStats {
// The rows seen (scanned) as part of the request. This includes the count of
// rows returned, as captured below.
int64 rows_seen_count = 1;
Expand All @@ -47,9 +57,6 @@ message ReadIteratorStats {

// The cells returned as part of the request.
int64 cells_returned_count = 4;

// The deletes seen as part of the request.
int64 deletes_seen_count = 5;
}

// RequestLatencyStats provides a measurement of the latency of the request as
Expand All @@ -66,29 +73,23 @@ message RequestLatencyStats {
// (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value
// needs to be sent in the response before the latency measurement including
// that transmission is finalized.
//
// Note: This value includes the end-to-end latency of contacting nodes in
// the targeted cluster, e.g. measuring from when the first byte arrives at
// the frontend server, to when this value is sent back as the last value in
// the response, including any latency incurred by contacting nodes, waiting
// for results from nodes, and finally sending results from nodes back to the
// caller.
google.protobuf.Duration frontend_server_latency = 1;
}

// ReadEfficiencyStats captures information about the efficiency of a read.
message ReadEfficiencyStats {
// FullReadStatsView captures all known information about a read.
message FullReadStatsView {
// Iteration stats describe how efficient the read is, e.g. comparing
// rows seen vs. rows returned or cells seen vs cells returned can provide an
// indication of read efficiency (the higher the ratio of seen to retuned the
// better).
ReadIteratorStats read_iterator_stats = 1;

// Request latency stats describe the time taken to complete a request, from
// the server side.
RequestLatencyStats request_latency_stats = 2;
}

// AllReadStats captures all known information about a read.
message AllReadStats {
// Iteration stats describe how efficient the read is, e.g. comparing
// rows seen vs. rows returned or cells seen vs cells returned can provide an
// indication of read efficiency (the higher the ratio of seen to retuned the
// better).
ReadIteratorStats read_iterator_stats = 1;
ReadIterationStats read_iteration_stats = 1;

// Request latency stats describe the time taken to complete a request, from
// the server side.
Expand All @@ -104,14 +105,9 @@ message RequestStats {
// based on the requested view.
//
// See the messages above for additional context.
oneof stats {
// Available with the
// ReadRowsRequest.RequestStatsView.REQUEST_STATS_EFFICIENCY view, see
// package google.bigtable.v2.
ReadEfficiencyStats read_efficiency_stats = 1;

oneof stats_view {
// Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL
// view, see package google.bigtable.v2.
AllReadStats all_read_stats = 2;
FullReadStatsView full_read_stats_view = 1;
}
}
Loading

0 comments on commit 355925e

Please sign in to comment.