Skip to content

Commit 730e2ba

Browse files
yoshi-automationchingor13
authored andcommitted
Regenerate bigquerystorage client - Add StreamStatus Progress (#6408)
1 parent 241480e commit 730e2ba

7 files changed

Lines changed: 1621 additions & 458 deletions

File tree

google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/Storage.java

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

google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/java/com/google/cloud/bigquery/storage/v1beta1/TableReferenceProto.java

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

google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/storage.proto

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ syntax = "proto3";
1818
package google.cloud.bigquery.storage.v1beta1;
1919

2020
import "google/api/annotations.proto";
21+
import "google/api/client.proto";
22+
import "google/api/field_behavior.proto";
23+
import "google/api/resource.proto";
2124
import "google/cloud/bigquery/storage/v1beta1/arrow.proto";
2225
import "google/cloud/bigquery/storage/v1beta1/avro.proto";
2326
import "google/cloud/bigquery/storage/v1beta1/read_options.proto";
2427
import "google/cloud/bigquery/storage/v1beta1/table_reference.proto";
2528
import "google/protobuf/empty.proto";
2629
import "google/protobuf/timestamp.proto";
27-
import "google/api/client.proto";
2830

2931
option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage";
3032
option java_package = "com.google.cloud.bigquery.storage.v1beta1";
@@ -36,6 +38,7 @@ service BigQueryStorage {
3638
option (google.api.default_host) = "bigquerystorage.googleapis.com";
3739
option (google.api.oauth_scopes) =
3840
"https://www.googleapis.com/auth/bigquery,"
41+
"https://www.googleapis.com/auth/bigquery.readonly,"
3942
"https://www.googleapis.com/auth/cloud-platform";
4043

4144
// Creates a new read session. A read session divides the contents of a
@@ -59,6 +62,7 @@ service BigQueryStorage {
5962
body: "*"
6063
}
6164
};
65+
option (google.api.method_signature) = "table_reference,parent,requested_streams";
6266
}
6367

6468
// Reads rows from the table in the format prescribed by the read session.
@@ -74,6 +78,7 @@ service BigQueryStorage {
7478
option (google.api.http) = {
7579
get: "/v1beta1/{read_position.stream.name=projects/*/streams/*}"
7680
};
81+
option (google.api.method_signature) = "read_position";
7782
}
7883

7984
// Creates additional streams for a ReadSession. This API can be used to
@@ -84,6 +89,7 @@ service BigQueryStorage {
8489
post: "/v1beta1/{session.name=projects/*/sessions/*}"
8590
body: "*"
8691
};
92+
option (google.api.method_signature) = "session,requested_streams";
8793
}
8894

8995
// Triggers the graceful termination of a single stream in a ReadSession. This
@@ -105,6 +111,7 @@ service BigQueryStorage {
105111
post: "/v1beta1/{stream.name=projects/*/streams/*}"
106112
body: "*"
107113
};
114+
option (google.api.method_signature) = "stream";
108115
}
109116

110117
// Splits a given read stream into two Streams. These streams are referred to
@@ -124,11 +131,17 @@ service BigQueryStorage {
124131
option (google.api.http) = {
125132
get: "/v1beta1/{original_stream.name=projects/*/streams/*}"
126133
};
134+
option (google.api.method_signature) = "original_stream";
127135
}
128136
}
129137

130138
// Information about a single data stream within a read session.
131139
message Stream {
140+
option (google.api.resource) = {
141+
type: "bigquerystorage.googleapis.com/Stream"
142+
pattern: "projects/{project}/locations/{location}/streams/{stream}"
143+
};
144+
132145
// Name of the stream, in the form
133146
// `projects/{project_id}/locations/{location}/streams/{stream_id}`.
134147
string name = 1;
@@ -145,6 +158,11 @@ message StreamPosition {
145158

146159
// Information returned from a `CreateReadSession` request.
147160
message ReadSession {
161+
option (google.api.resource) = {
162+
type: "bigquerystorage.googleapis.com/ReadSession"
163+
pattern: "projects/{project}/locations/{location}/sessions/{session}"
164+
};
165+
148166
// Unique identifier for the session, in the form
149167
// `projects/{project_id}/locations/{location}/sessions/{session_id}`.
150168
string name = 1;
@@ -181,17 +199,17 @@ message ReadSession {
181199
// requested parallelism, projection filters and constraints.
182200
message CreateReadSessionRequest {
183201
// Required. Reference to the table to read.
184-
TableReference table_reference = 1;
202+
TableReference table_reference = 1 [(google.api.field_behavior) = REQUIRED];
185203

186204
// Required. String of the form `projects/{project_id}` indicating the
187205
// project this ReadSession is associated with. This is the project that will
188206
// be billed for usage.
189-
string parent = 6;
207+
string parent = 6 [(google.api.field_behavior) = REQUIRED];
190208

191-
// Optional. Any modifiers to the Table (e.g. snapshot timestamp).
209+
// Any modifiers to the Table (e.g. snapshot timestamp).
192210
TableModifiers table_modifiers = 2;
193211

194-
// Optional. Initial number of streams. If unset or 0, we will
212+
// Initial number of streams. If unset or 0, we will
195213
// provide a value of streams so as to produce reasonable throughput. Must be
196214
// non-negative. The number of streams may be lower than the requested number,
197215
// depending on the amount parallelism that is reasonable for the table and
@@ -200,7 +218,7 @@ message CreateReadSessionRequest {
200218
// Streams must be read starting from offset 0.
201219
int32 requested_streams = 3;
202220

203-
// Optional. Read options for this session (e.g. column selection, filters).
221+
// Read options for this session (e.g. column selection, filters).
204222
TableReadOptions read_options = 4;
205223

206224
// Data output format. Currently default to Avro.
@@ -248,7 +266,7 @@ message ReadRowsRequest {
248266
// Required. Identifier of the position in the stream to start reading from.
249267
// The offset requested must be less than the last row read from ReadRows.
250268
// Requesting a larger offset is undefined.
251-
StreamPosition read_position = 1;
269+
StreamPosition read_position = 1 [(google.api.field_behavior) = REQUIRED];
252270
}
253271

254272
// Progress information for a given Stream.
@@ -267,6 +285,12 @@ message StreamStatus {
267285
// sharding strategy.
268286
float fraction_consumed = 2;
269287

288+
// Represents the progress of the current stream.
289+
//
290+
// Note: This value is under development and should not be used. Use
291+
// `fraction_consumed` instead.
292+
Progress progress = 4;
293+
270294
// Whether this stream can be split. For sessions that use the LIQUID sharding
271295
// strategy, this value is always false. For BALANCED sessions, this value is
272296
// false when enough data have been read such that no more splits are possible
@@ -275,6 +299,25 @@ message StreamStatus {
275299
bool is_splittable = 3;
276300
}
277301

302+
message Progress {
303+
// The fraction of rows assigned to the stream that have been processed by the
304+
// server so far, not including the rows in the current response message.
305+
//
306+
// This value, along with `at_response_end`, can be used to interpolate the
307+
// progress made as the rows in the message are being processed using the
308+
// following formula: `at_response_start + (at_response_end -
309+
// at_response_start) * rows_processed_from_response / rows_in_response`.
310+
//
311+
// Note that if a filter is provided, the `at_response_end` value of the
312+
// previous response may not necessarily be equal to the `at_response_start`
313+
// value of the current response.
314+
float at_response_start = 1;
315+
316+
// Similar to `at_response_start`, except that this value includes the rows in
317+
// the current response.
318+
float at_response_end = 2;
319+
}
320+
278321
// Information on if the current connection is being throttled.
279322
message ThrottleStatus {
280323
// How much this connection is being throttled.
@@ -313,12 +356,12 @@ message ReadRowsResponse {
313356
message BatchCreateReadSessionStreamsRequest {
314357
// Required. Must be a non-expired session obtained from a call to
315358
// CreateReadSession. Only the name field needs to be set.
316-
ReadSession session = 1;
359+
ReadSession session = 1 [(google.api.field_behavior) = REQUIRED];
317360

318361
// Required. Number of new streams requested. Must be positive.
319362
// Number of added streams may be less than this, see CreateReadSessionRequest
320363
// for more information.
321-
int32 requested_streams = 2;
364+
int32 requested_streams = 2 [(google.api.field_behavior) = REQUIRED];
322365
}
323366

324367
// The response from `BatchCreateReadSessionStreams` returns the stream

google-api-grpc/proto-google-cloud-bigquerystorage-v1beta1/src/main/proto/google/cloud/bigquery/storage/v1beta1/table_reference.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ syntax = "proto3";
1717

1818
package google.cloud.bigquery.storage.v1beta1;
1919

20+
import "google/api/resource.proto";
2021
import "google/protobuf/timestamp.proto";
2122

2223
option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta1;storage";

google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ public BigQueryStorageStub getStub() {
189189
* @param tableReference Required. Reference to the table to read.
190190
* @param parent Required. String of the form `projects/{project_id}` indicating the project this
191191
* ReadSession is associated with. This is the project that will be billed for usage.
192-
* @param requestedStreams Optional. Initial number of streams. If unset or 0, we will provide a
193-
* value of streams so as to produce reasonable throughput. Must be non-negative. The number
194-
* of streams may be lower than the requested number, depending on the amount parallelism that
195-
* is reasonable for the table and the maximum amount of parallelism allowed by the system.
192+
* @param requestedStreams Initial number of streams. If unset or 0, we will provide a value of
193+
* streams so as to produce reasonable throughput. Must be non-negative. The number of streams
194+
* may be lower than the requested number, depending on the amount parallelism that is
195+
* reasonable for the table and the maximum amount of parallelism allowed by the system.
196196
* <p>Streams must be read starting from offset 0.
197197
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
198198
*/

google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/stub/BigQueryStorageStubSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public class BigQueryStorageStubSettings extends StubSettings<BigQueryStorageStu
8585
private static final ImmutableList<String> DEFAULT_SERVICE_SCOPES =
8686
ImmutableList.<String>builder()
8787
.add("https://www.googleapis.com/auth/bigquery")
88+
.add("https://www.googleapis.com/auth/bigquery.readonly")
8889
.add("https://www.googleapis.com/auth/cloud-platform")
8990
.build();
9091

google-cloud-clients/google-cloud-bigquerystorage/synth.metadata

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
2-
"updateTime": "2019-08-02T07:35:15.197154Z",
2+
"updateTime": "2019-10-02T07:34:49.272324Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.32.0",
8-
"dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d"
7+
"version": "0.37.1",
8+
"dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "1b1ef1ca146c2119f077bca5e2b638c6bacb0925",
16-
"internalRef": "261214002"
15+
"sha": "2123bcae97debe57e0870fca157cdf21e32bf3fb",
16+
"internalRef": "272289410"
1717
}
1818
}
1919
],

0 commit comments

Comments
 (0)