Skip to content

Commit 7bd13e7

Browse files
docs: clarify size limitations for AppendRowsRequest (#283)
* docs: clarify size limitations for AppendRowsRequest chore: add preferred_min_stream_count to CreateReadSessionRequest chore: add write_stream to AppendRowsResponse PiperOrigin-RevId: 463602530 Source-Link: googleapis/googleapis@d33b3fa Source-Link: googleapis/googleapis-gen@90995f6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTA5OTVmNjQzM2QwZWNkMjkwZjE4NjE2OGNlOTU3ZDZhMGRiOWM2OCJ9 * 🦉 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>
1 parent c1a36c9 commit 7bd13e7

File tree

7 files changed

+107
-2
lines changed

7 files changed

+107
-2
lines changed

packages/google-cloud-bigquery-storage/protos/google/cloud/bigquery/storage/v1/storage.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ message CreateReadSessionRequest {
256256
// determine an upper bound OR set this a size for the maximum "units of work"
257257
// it can gracefully handle.
258258
int32 max_stream_count = 3;
259+
260+
// The minimum preferred stream count. This parameter can be used to inform
261+
// the service that there is a desired lower bound on the number of streams.
262+
// This is typically a target parallelism of the client (e.g. a Spark
263+
// cluster with N-workers would set this to a low multiple of N to ensure
264+
// good cluster utilization).
265+
//
266+
// The system will make a best effort to provide at least this number of
267+
// streams, but in some cases might provide less.
268+
int32 preferred_min_stream_count = 4;
259269
}
260270

261271
// Request message for `ReadRows`.
@@ -395,6 +405,9 @@ message CreateWriteStreamRequest {
395405
// Due to the nature of AppendRows being a bidirectional streaming RPC, certain
396406
// parts of the AppendRowsRequest need only be specified for the first request
397407
// sent each time the gRPC network connection is opened/reopened.
408+
//
409+
// The size of a single AppendRowsRequest must be less than 10 MB in size.
410+
// Requests larger than this return an error, typically `INVALID_ARGUMENT`.
398411
message AppendRowsRequest {
399412
// ProtoData contains the data rows and schema when constructing append
400413
// requests.
@@ -495,6 +508,10 @@ message AppendRowsResponse {
495508
// appended. The API will return row level error info, so that the caller can
496509
// remove the bad rows and retry the request.
497510
repeated RowError row_errors = 4;
511+
512+
// The target of the append operation. Matches the write_stream in the
513+
// corresponding request.
514+
string write_stream = 5;
498515
}
499516

500517
// Request message for `GetWriteStreamRequest`.

packages/google-cloud-bigquery-storage/protos/protos.d.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-bigquery-storage/protos/protos.js

Lines changed: 46 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-bigquery-storage/protos/protos.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-bigquery-storage/samples/generated/v1/big_query_read.create_read_session.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ function main(parent, readSession) {
4646
* it can gracefully handle.
4747
*/
4848
// const maxStreamCount = 1234
49+
/**
50+
* The minimum preferred stream count. This parameter can be used to inform
51+
* the service that there is a desired lower bound on the number of streams.
52+
* This is typically a target parallelism of the client (e.g. a Spark
53+
* cluster with N-workers would set this to a low multiple of N to ensure
54+
* good cluster utilization).
55+
* The system will make a best effort to provide at least this number of
56+
* streams, but in some cases might provide less.
57+
*/
58+
// const preferredMinStreamCount = 1234
4959

5060
// Imports the Storage library
5161
const {BigQueryReadClient} = require('@google-cloud/bigquery-storage').v1;

packages/google-cloud-bigquery-storage/samples/generated/v1/snippet_metadata.google.cloud.bigquery.storage.v1.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"segments": [
2323
{
2424
"start": 25,
25-
"end": 68,
25+
"end": 78,
2626
"type": "FULL"
2727
}
2828
],
@@ -42,6 +42,10 @@
4242
{
4343
"name": "max_stream_count",
4444
"type": "TYPE_INT32"
45+
},
46+
{
47+
"name": "preferred_min_stream_count",
48+
"type": "TYPE_INT32"
4549
}
4650
],
4751
"resultType": ".google.cloud.bigquery.storage.v1.ReadSession",

packages/google-cloud-bigquery-storage/src/v1/big_query_read_client.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,15 @@ export class BigQueryReadClient {
376376
* Typically, clients should either leave this unset to let the system to
377377
* determine an upper bound OR set this a size for the maximum "units of work"
378378
* it can gracefully handle.
379+
* @param {number} request.preferredMinStreamCount
380+
* The minimum preferred stream count. This parameter can be used to inform
381+
* the service that there is a desired lower bound on the number of streams.
382+
* This is typically a target parallelism of the client (e.g. a Spark
383+
* cluster with N-workers would set this to a low multiple of N to ensure
384+
* good cluster utilization).
385+
*
386+
* The system will make a best effort to provide at least this number of
387+
* streams, but in some cases might provide less.
379388
* @param {object} [options]
380389
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
381390
* @returns {Promise} - The promise which resolves to an array.

0 commit comments

Comments
 (0)