@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
22
22
import "google/api/resource.proto" ;
23
23
import "google/api/routing.proto" ;
24
24
import "google/bigtable/v2/data.proto" ;
25
+ import "google/bigtable/v2/request_stats.proto" ;
25
26
import "google/protobuf/wrappers.proto" ;
26
27
import "google/rpc/status.proto" ;
27
28
@@ -32,14 +33,14 @@ option java_outer_classname = "BigtableProto";
32
33
option java_package = "com.google.bigtable.v2" ;
33
34
option php_namespace = "Google\\Cloud\\Bigtable\\V2" ;
34
35
option ruby_package = "Google::Cloud::Bigtable::V2" ;
35
- option (google.api.resource_definition ) = {
36
- type : "bigtableadmin.googleapis.com/Table"
37
- pattern : "projects/{project}/instances/{instance}/tables/{table}"
38
- };
39
36
option (google.api.resource_definition ) = {
40
37
type : "bigtableadmin.googleapis.com/Instance"
41
38
pattern : "projects/{project}/instances/{instance}"
42
39
};
40
+ option (google.api.resource_definition ) = {
41
+ type : "bigtableadmin.googleapis.com/Table"
42
+ pattern : "projects/{project}/instances/{instance}/tables/{table}"
43
+ };
43
44
44
45
// Service for reading from and writing to existing Bigtable tables.
45
46
service Bigtable {
@@ -67,9 +68,7 @@ service Bigtable {
67
68
field : "table_name"
68
69
path_template : "{table_name=projects/*/instances/*/tables/*}"
69
70
}
70
- routing_parameters {
71
- field : "app_profile_id"
72
- }
71
+ routing_parameters { field : "app_profile_id" }
73
72
};
74
73
option (google.api.method_signature ) = "table_name" ;
75
74
option (google.api.method_signature ) = "table_name,app_profile_id" ;
@@ -79,7 +78,8 @@ service Bigtable {
79
78
// delimit contiguous sections of the table of approximately equal size,
80
79
// which can be used to break up the data for distributed tasks like
81
80
// mapreduces.
82
- rpc SampleRowKeys (SampleRowKeysRequest ) returns (stream SampleRowKeysResponse ) {
81
+ rpc SampleRowKeys (SampleRowKeysRequest )
82
+ returns (stream SampleRowKeysResponse ) {
83
83
option (google.api.http ) = {
84
84
get : "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys"
85
85
};
@@ -88,9 +88,7 @@ service Bigtable {
88
88
field : "table_name"
89
89
path_template : "{table_name=projects/*/instances/*/tables/*}"
90
90
}
91
- routing_parameters {
92
- field : "app_profile_id"
93
- }
91
+ routing_parameters { field : "app_profile_id" }
94
92
};
95
93
option (google.api.method_signature ) = "table_name" ;
96
94
option (google.api.method_signature ) = "table_name,app_profile_id" ;
@@ -108,12 +106,11 @@ service Bigtable {
108
106
field : "table_name"
109
107
path_template : "{table_name=projects/*/instances/*/tables/*}"
110
108
}
111
- routing_parameters {
112
- field : "app_profile_id"
113
- }
109
+ routing_parameters { field : "app_profile_id" }
114
110
};
115
111
option (google.api.method_signature ) = "table_name,row_key,mutations" ;
116
- option (google.api.method_signature ) = "table_name,row_key,mutations,app_profile_id" ;
112
+ option (google.api.method_signature ) =
113
+ "table_name,row_key,mutations,app_profile_id" ;
117
114
}
118
115
119
116
// Mutates multiple rows in a batch. Each individual row is mutated
@@ -129,16 +126,15 @@ service Bigtable {
129
126
field : "table_name"
130
127
path_template : "{table_name=projects/*/instances/*/tables/*}"
131
128
}
132
- routing_parameters {
133
- field : "app_profile_id"
134
- }
129
+ routing_parameters { field : "app_profile_id" }
135
130
};
136
131
option (google.api.method_signature ) = "table_name,entries" ;
137
132
option (google.api.method_signature ) = "table_name,entries,app_profile_id" ;
138
133
}
139
134
140
135
// Mutates a row atomically based on the output of a predicate Reader filter.
141
- rpc CheckAndMutateRow (CheckAndMutateRowRequest ) returns (CheckAndMutateRowResponse ) {
136
+ rpc CheckAndMutateRow (CheckAndMutateRowRequest )
137
+ returns (CheckAndMutateRowResponse ) {
142
138
option (google.api.http ) = {
143
139
post : "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow"
144
140
body : "*"
@@ -148,12 +144,12 @@ service Bigtable {
148
144
field : "table_name"
149
145
path_template : "{table_name=projects/*/instances/*/tables/*}"
150
146
}
151
- routing_parameters {
152
- field : "app_profile_id"
153
- }
147
+ routing_parameters { field : "app_profile_id" }
154
148
};
155
- option (google.api.method_signature ) = "table_name,row_key,predicate_filter,true_mutations,false_mutations" ;
156
- option (google.api.method_signature ) = "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" ;
149
+ option (google.api.method_signature ) =
150
+ "table_name,row_key,predicate_filter,true_mutations,false_mutations" ;
151
+ option (google.api.method_signature ) =
152
+ "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" ;
157
153
}
158
154
159
155
// Warm up associated instance metadata for this connection.
@@ -168,9 +164,7 @@ service Bigtable {
168
164
field : "name"
169
165
path_template : "{name=projects/*/instances/*}"
170
166
}
171
- routing_parameters {
172
- field : "app_profile_id"
173
- }
167
+ routing_parameters { field : "app_profile_id" }
174
168
};
175
169
option (google.api.method_signature ) = "name" ;
176
170
option (google.api.method_signature ) = "name,app_profile_id" ;
@@ -181,7 +175,8 @@ service Bigtable {
181
175
// entry based on pre-defined read/modify/write rules. The new value for the
182
176
// timestamp is the greater of the existing timestamp or the current server
183
177
// time. The method returns the new contents of all modified cells.
184
- rpc ReadModifyWriteRow (ReadModifyWriteRowRequest ) returns (ReadModifyWriteRowResponse ) {
178
+ rpc ReadModifyWriteRow (ReadModifyWriteRowRequest )
179
+ returns (ReadModifyWriteRowResponse ) {
185
180
option (google.api.http ) = {
186
181
post : "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow"
187
182
body : "*"
@@ -191,17 +186,36 @@ service Bigtable {
191
186
field : "table_name"
192
187
path_template : "{table_name=projects/*/instances/*/tables/*}"
193
188
}
194
- routing_parameters {
195
- field : "app_profile_id"
196
- }
189
+ routing_parameters { field : "app_profile_id" }
197
190
};
198
191
option (google.api.method_signature ) = "table_name,row_key,rules" ;
199
- option (google.api.method_signature ) = "table_name,row_key,rules,app_profile_id" ;
192
+ option (google.api.method_signature ) =
193
+ "table_name,row_key,rules,app_profile_id" ;
200
194
}
201
195
}
202
196
203
197
// Request message for Bigtable.ReadRows.
204
198
message ReadRowsRequest {
199
+ //
200
+ // The desired view into RequestStats that should be returned in the response.
201
+ //
202
+ // See also: RequestStats message.
203
+ enum RequestStatsView {
204
+ // The default / unset value. The API will default to the NONE option below.
205
+ REQUEST_STATS_VIEW_UNSPECIFIED = 0 ;
206
+
207
+ // Do not include any RequestStats in the response. This will leave the
208
+ // RequestStats embedded message unset in the response.
209
+ REQUEST_STATS_NONE = 1 ;
210
+
211
+ // Include stats related to the efficiency of the read.
212
+ REQUEST_STATS_EFFICIENCY = 2 ;
213
+
214
+ // Include the full set of available RequestStats in the response,
215
+ // applicable to this read.
216
+ REQUEST_STATS_FULL = 3 ;
217
+ }
218
+
205
219
// Required. The unique name of the table from which to read.
206
220
// Values are of the form
207
221
// `projects/<project>/instances/<instance>/tables/<table>`.
@@ -212,8 +226,8 @@ message ReadRowsRequest {
212
226
}
213
227
];
214
228
215
- // This value specifies routing for replication. If not specified, the
216
- // "default" application profile will be used .
229
+ // This value specifies routing for replication. This API only accepts the
230
+ // empty value of app_profile_id .
217
231
string app_profile_id = 5 ;
218
232
219
233
// The row keys and/or ranges to read sequentially. If not specified, reads
@@ -227,6 +241,9 @@ message ReadRowsRequest {
227
241
// The read will stop after committing to N rows' worth of results. The
228
242
// default (zero) is to return all results.
229
243
int64 rows_limit = 4 ;
244
+
245
+ // The view into RequestStats, as described above.
246
+ RequestStatsView request_stats_view = 6 ;
230
247
}
231
248
232
249
// Response message for Bigtable.ReadRows.
@@ -306,6 +323,28 @@ message ReadRowsResponse {
306
323
// lot of data that was filtered out since the last committed row
307
324
// key, allowing the client to skip that work on a retry.
308
325
bytes last_scanned_row_key = 2 ;
326
+
327
+ //
328
+ // If requested, provide enhanced query performance statistics. The semantics
329
+ // dictate:
330
+ // * request_stats is empty on every (streamed) response, except
331
+ // * request_stats has non-empty information after all chunks have been
332
+ // streamed, where the ReadRowsResponse message only contains
333
+ // request_stats.
334
+ // * For example, if a read request would have returned an empty
335
+ // response instead a single ReadRowsResponse is streamed with empty
336
+ // chunks and request_stats filled.
337
+ //
338
+ // Visually, response messages will stream as follows:
339
+ // ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}}
340
+ // \______________________/ \________________________________/
341
+ // Primary response Trailer of RequestStats info
342
+ //
343
+ // Or if the read did not return any values:
344
+ // {chunks: [], request_stats: {...}}
345
+ // \________________________________/
346
+ // Trailer of RequestStats info
347
+ RequestStats request_stats = 3 ;
309
348
}
310
349
311
350
// Request message for Bigtable.SampleRowKeys.
@@ -345,8 +384,8 @@ message SampleRowKeysResponse {
345
384
346
385
// Request message for Bigtable.MutateRow.
347
386
message MutateRowRequest {
348
- // Required. The unique name of the table to which the mutation should be applied.
349
- // Values are of the form
387
+ // Required. The unique name of the table to which the mutation should be
388
+ // applied. Values are of the form
350
389
// `projects/<project>/instances/<instance>/tables/<table>`.
351
390
string table_name = 1 [
352
391
(google.api.field_behavior ) = REQUIRED ,
@@ -362,16 +401,14 @@ message MutateRowRequest {
362
401
// Required. The key of the row to which the mutation should be applied.
363
402
bytes row_key = 2 [(google.api.field_behavior ) = REQUIRED ];
364
403
365
- // Required. Changes to be atomically applied to the specified row. Entries are applied
366
- // in order, meaning that earlier mutations can be masked by later ones.
367
- // Must contain at least one entry and at most 100000.
404
+ // Required. Changes to be atomically applied to the specified row. Entries
405
+ // are applied in order, meaning that earlier mutations can be masked by later
406
+ // ones. Must contain at least one entry and at most 100000.
368
407
repeated Mutation mutations = 3 [(google.api.field_behavior ) = REQUIRED ];
369
408
}
370
409
371
410
// Response message for Bigtable.MutateRow.
372
- message MutateRowResponse {
373
-
374
- }
411
+ message MutateRowResponse {}
375
412
376
413
// Request message for BigtableService.MutateRows.
377
414
message MutateRowsRequest {
@@ -380,14 +417,14 @@ message MutateRowsRequest {
380
417
// The key of the row to which the `mutations` should be applied.
381
418
bytes row_key = 1 ;
382
419
383
- // Required. Changes to be atomically applied to the specified row. Mutations are
384
- // applied in order, meaning that earlier mutations can be masked by
385
- // later ones.
386
- // You must specify at least one mutation.
420
+ // Required. Changes to be atomically applied to the specified row.
421
+ // Mutations are applied in order, meaning that earlier mutations can be
422
+ // masked by later ones. You must specify at least one mutation.
387
423
repeated Mutation mutations = 2 [(google.api.field_behavior ) = REQUIRED ];
388
424
}
389
425
390
- // Required. The unique name of the table to which the mutations should be applied.
426
+ // Required. The unique name of the table to which the mutations should be
427
+ // applied.
391
428
string table_name = 1 [
392
429
(google.api.field_behavior ) = REQUIRED ,
393
430
(google.api.resource_reference ) = {
@@ -428,9 +465,8 @@ message MutateRowsResponse {
428
465
429
466
// Request message for Bigtable.CheckAndMutateRow.
430
467
message CheckAndMutateRowRequest {
431
- // Required. The unique name of the table to which the conditional mutation should be
432
- // applied.
433
- // Values are of the form
468
+ // Required. The unique name of the table to which the conditional mutation
469
+ // should be applied. Values are of the form
434
470
// `projects/<project>/instances/<instance>/tables/<table>`.
435
471
string table_name = 1 [
436
472
(google.api.field_behavior ) = REQUIRED ,
@@ -443,7 +479,8 @@ message CheckAndMutateRowRequest {
443
479
// "default" application profile will be used.
444
480
string app_profile_id = 7 ;
445
481
446
- // Required. The key of the row to which the conditional mutation should be applied.
482
+ // Required. The key of the row to which the conditional mutation should be
483
+ // applied.
447
484
bytes row_key = 2 [(google.api.field_behavior ) = REQUIRED ];
448
485
449
486
// The filter to be applied to the contents of the specified row. Depending
@@ -476,8 +513,9 @@ message CheckAndMutateRowResponse {
476
513
477
514
// Request message for client connection keep-alive and warming.
478
515
message PingAndWarmRequest {
479
- // Required. The unique name of the instance to check permissions for as well as
480
- // respond. Values are of the form `projects/<project>/instances/<instance>`.
516
+ // Required. The unique name of the instance to check permissions for as well
517
+ // as respond. Values are of the form
518
+ // `projects/<project>/instances/<instance>`.
481
519
string name = 1 [
482
520
(google.api.field_behavior ) = REQUIRED ,
483
521
(google.api.resource_reference ) = {
@@ -491,15 +529,12 @@ message PingAndWarmRequest {
491
529
}
492
530
493
531
// Response message for Bigtable.PingAndWarm connection keepalive and warming.
494
- message PingAndWarmResponse {
495
-
496
- }
532
+ message PingAndWarmResponse {}
497
533
498
534
// Request message for Bigtable.ReadModifyWriteRow.
499
535
message ReadModifyWriteRowRequest {
500
- // Required. The unique name of the table to which the read/modify/write rules should be
501
- // applied.
502
- // Values are of the form
536
+ // Required. The unique name of the table to which the read/modify/write rules
537
+ // should be applied. Values are of the form
503
538
// `projects/<project>/instances/<instance>/tables/<table>`.
504
539
string table_name = 1 [
505
540
(google.api.field_behavior ) = REQUIRED ,
@@ -512,13 +547,15 @@ message ReadModifyWriteRowRequest {
512
547
// "default" application profile will be used.
513
548
string app_profile_id = 4 ;
514
549
515
- // Required. The key of the row to which the read/modify/write rules should be applied.
550
+ // Required. The key of the row to which the read/modify/write rules should be
551
+ // applied.
516
552
bytes row_key = 2 [(google.api.field_behavior ) = REQUIRED ];
517
553
518
- // Required. Rules specifying how the specified row's contents are to be transformed
519
- // into writes. Entries are applied in order, meaning that earlier rules will
520
- // affect the results of later ones.
521
- repeated ReadModifyWriteRule rules = 3 [(google.api.field_behavior ) = REQUIRED ];
554
+ // Required. Rules specifying how the specified row's contents are to be
555
+ // transformed into writes. Entries are applied in order, meaning that earlier
556
+ // rules will affect the results of later ones.
557
+ repeated ReadModifyWriteRule rules = 3
558
+ [(google.api.field_behavior ) = REQUIRED ];
522
559
}
523
560
524
561
// Response message for Bigtable.ReadModifyWriteRow.
0 commit comments