Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Commit 542b946

Browse files
fix(deps): Update the Java code generator (gapic-generator-java) to 2.32.0 (#2363)
* fix(deps): Update the Java code generator (gapic-generator-java) to 2.32.0 PiperOrigin-RevId: 599914188 Source-Link: googleapis/googleapis@17e6661 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d86ba5be537e489435105ca85566cc4103301aba Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDg2YmE1YmU1MzdlNDg5NDM1MTA1Y2E4NTU2NmNjNDEwMzMwMWFiYSJ9 feat: add ability to request compressed ReadRowsResponse rows This change allows the client to request raw lz4 compression of the ReadRowsResponse rows data for both ArrowRecordBatches and Avro rows. PiperOrigin-RevId: 597000088 Source-Link: googleapis/googleapis@341d70f Source-Link: https://github.com/googleapis/googleapis-gen/commit/01713f3f5534acc78f04d59e13c0668c8129bf03 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDE3MTNmM2Y1NTM0YWNjNzhmMDRkNTllMTNjMDY2OGM4MTI5YmYwMyJ9 fix(deps): Update the Java code generator (gapic-generator-java) to 2.31.0 PiperOrigin-RevId: 596645164 Source-Link: googleapis/googleapis@4a0e62e Source-Link: https://github.com/googleapis/googleapis-gen/commit/a10ed6a77676c37e60799098d48d0afb16008613 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTEwZWQ2YTc3Njc2YzM3ZTYwNzk5MDk4ZDQ4ZDBhZmIxNjAwODYxMyJ9 * 🦉 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 2d8245f commit 542b946

164 files changed

Lines changed: 1650 additions & 403 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BaseBigQueryReadClient.java

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,62 @@
5353
* such as threads. In the example above, try-with-resources is used, which automatically calls
5454
* close().
5555
*
56-
* <p>The surface of this class includes several types of Java methods for each of the API's
57-
* methods:
58-
*
59-
* <ol>
60-
* <li>A "flattened" method. With this type of method, the fields of the request type have been
61-
* converted into function parameters. It may be the case that not all fields are available as
62-
* parameters, and not every API method will have a flattened method entry point.
63-
* <li>A "request object" method. This type of method only takes one parameter, a request object,
64-
* which must be constructed before the call. Not every API method will have a request object
65-
* method.
66-
* <li>A "callable" method. This type of method takes no parameters and returns an immutable API
67-
* callable object, which can be used to initiate calls to the service.
68-
* </ol>
56+
* <table>
57+
* <caption>Methods</caption>
58+
* <tr>
59+
* <th>Method</th>
60+
* <th>Description</th>
61+
* <th>Method Variants</th>
62+
* </tr>
63+
* <tr>
64+
* <td><p> CreateReadSession</td>
65+
* <td><p> Creates a new read session. A read session divides the contents of a BigQuery table into one or more streams, which can then be used to read data from the table. The read session also specifies properties of the data to be read, such as a list of columns or a push-down filter describing the rows to be returned.
66+
* <p> A particular row can be read by at most one stream. When the caller has reached the end of each stream in the session, then all the data in the table has been read.
67+
* <p> Data is assigned to each stream such that roughly the same number of rows can be read from each stream. Because the server-side unit for assigning data is collections of rows, the API does not guarantee that each stream will return the same number or rows. Additionally, the limits are enforced based on the number of pre-filtered rows, so some filters can lead to lopsided assignments.
68+
* <p> Read sessions automatically expire 6 hours after they are created and do not require manual clean-up by the caller.</td>
69+
* <td>
70+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
71+
* <ul>
72+
* <li><p> createReadSession(CreateReadSessionRequest request)
73+
* </ul>
74+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
75+
* <ul>
76+
* <li><p> createReadSession(ProjectName parent, ReadSession readSession, int maxStreamCount)
77+
* <li><p> createReadSession(String parent, ReadSession readSession, int maxStreamCount)
78+
* </ul>
79+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
80+
* <ul>
81+
* <li><p> createReadSessionCallable()
82+
* </ul>
83+
* </td>
84+
* </tr>
85+
* <tr>
86+
* <td><p> ReadRows</td>
87+
* <td><p> Reads rows from the stream in the format prescribed by the ReadSession. Each response contains one or more table rows, up to a maximum of 100 MiB per response; read requests which attempt to read individual rows larger than 100 MiB will fail.
88+
* <p> Each request also returns a set of stream statistics reflecting the current state of the stream.</td>
89+
* <td>
90+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
91+
* <ul>
92+
* <li><p> readRowsCallable()
93+
* </ul>
94+
* </td>
95+
* </tr>
96+
* <tr>
97+
* <td><p> SplitReadStream</td>
98+
* <td><p> Splits a given `ReadStream` into two `ReadStream` objects. These `ReadStream` objects are referred to as the primary and the residual streams of the split. The original `ReadStream` can still be read from in the same manner as before. Both of the returned `ReadStream` objects can also be read from, and the rows returned by both child streams will be the same as the rows read from the original stream.
99+
* <p> Moreover, the two child streams will be allocated back-to-back in the original `ReadStream`. Concretely, it is guaranteed that for streams original, primary, and residual, that original[0-j] = primary[0-j] and original[j-n] = residual[0-m] once the streams have been read to completion.</td>
100+
* <td>
101+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
102+
* <ul>
103+
* <li><p> splitReadStream(SplitReadStreamRequest request)
104+
* </ul>
105+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
106+
* <ul>
107+
* <li><p> splitReadStreamCallable()
108+
* </ul>
109+
* </td>
110+
* </tr>
111+
* </table>
69112
*
70113
* <p>See the individual methods for example code.
71114
*

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/BigQueryWriteClient.java

Lines changed: 129 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,135 @@
5353
* <p>Note: close() needs to be called on the BigQueryWriteClient object to clean up resources such
5454
* as threads. In the example above, try-with-resources is used, which automatically calls close().
5555
*
56-
* <p>The surface of this class includes several types of Java methods for each of the API's
57-
* methods:
58-
*
59-
* <ol>
60-
* <li>A "flattened" method. With this type of method, the fields of the request type have been
61-
* converted into function parameters. It may be the case that not all fields are available as
62-
* parameters, and not every API method will have a flattened method entry point.
63-
* <li>A "request object" method. This type of method only takes one parameter, a request object,
64-
* which must be constructed before the call. Not every API method will have a request object
65-
* method.
66-
* <li>A "callable" method. This type of method takes no parameters and returns an immutable API
67-
* callable object, which can be used to initiate calls to the service.
68-
* </ol>
56+
* <table>
57+
* <caption>Methods</caption>
58+
* <tr>
59+
* <th>Method</th>
60+
* <th>Description</th>
61+
* <th>Method Variants</th>
62+
* </tr>
63+
* <tr>
64+
* <td><p> CreateWriteStream</td>
65+
* <td><p> Creates a write stream to the given table. Additionally, every table has a special stream named '_default' to which data can be written. This stream doesn't need to be created using CreateWriteStream. It is a stream that can be used simultaneously by any number of clients. Data written to this stream is considered committed as soon as an acknowledgement is received.</td>
66+
* <td>
67+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
68+
* <ul>
69+
* <li><p> createWriteStream(CreateWriteStreamRequest request)
70+
* </ul>
71+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
72+
* <ul>
73+
* <li><p> createWriteStream(TableName parent, WriteStream writeStream)
74+
* <li><p> createWriteStream(String parent, WriteStream writeStream)
75+
* </ul>
76+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
77+
* <ul>
78+
* <li><p> createWriteStreamCallable()
79+
* </ul>
80+
* </td>
81+
* </tr>
82+
* <tr>
83+
* <td><p> AppendRows</td>
84+
* <td><p> Appends data to the given stream.
85+
* <p> If `offset` is specified, the `offset` is checked against the end of stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an attempt is made to append to an offset beyond the current end of the stream or `ALREADY_EXISTS` if user provides an `offset` that has already been written to. User can retry with adjusted offset within the same RPC connection. If `offset` is not specified, append happens at the end of the stream.
86+
* <p> The response contains an optional offset at which the append happened. No offset information will be returned for appends to a default stream.
87+
* <p> Responses are received in the same order in which requests are sent. There will be one response for each successful inserted request. Responses may optionally embed error information if the originating AppendRequest was not successfully processed.
88+
* <p> The specifics of when successfully appended data is made visible to the table are governed by the type of stream:
89+
* <ul>
90+
* <li> For COMMITTED streams (which includes the default stream), data is visible immediately upon successful append.
91+
* </ul>
92+
* <ul>
93+
* <li> For BUFFERED streams, data is made visible via a subsequent `FlushRows` rpc which advances a cursor to a newer offset in the stream.
94+
* </ul>
95+
* <ul>
96+
* <li> For PENDING streams, data is not made visible until the stream itself is finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly committed via the `BatchCommitWriteStreams` rpc.
97+
* </ul></td>
98+
* <td>
99+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
100+
* <ul>
101+
* <li><p> appendRowsCallable()
102+
* </ul>
103+
* </td>
104+
* </tr>
105+
* <tr>
106+
* <td><p> GetWriteStream</td>
107+
* <td><p> Gets information about a write stream.</td>
108+
* <td>
109+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
110+
* <ul>
111+
* <li><p> getWriteStream(GetWriteStreamRequest request)
112+
* </ul>
113+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
114+
* <ul>
115+
* <li><p> getWriteStream(WriteStreamName name)
116+
* <li><p> getWriteStream(String name)
117+
* </ul>
118+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
119+
* <ul>
120+
* <li><p> getWriteStreamCallable()
121+
* </ul>
122+
* </td>
123+
* </tr>
124+
* <tr>
125+
* <td><p> FinalizeWriteStream</td>
126+
* <td><p> Finalize a write stream so that no new data can be appended to the stream. Finalize is not supported on the '_default' stream.</td>
127+
* <td>
128+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
129+
* <ul>
130+
* <li><p> finalizeWriteStream(FinalizeWriteStreamRequest request)
131+
* </ul>
132+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
133+
* <ul>
134+
* <li><p> finalizeWriteStream(WriteStreamName name)
135+
* <li><p> finalizeWriteStream(String name)
136+
* </ul>
137+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
138+
* <ul>
139+
* <li><p> finalizeWriteStreamCallable()
140+
* </ul>
141+
* </td>
142+
* </tr>
143+
* <tr>
144+
* <td><p> BatchCommitWriteStreams</td>
145+
* <td><p> Atomically commits a group of `PENDING` streams that belong to the same `parent` table.
146+
* <p> Streams must be finalized before commit and cannot be committed multiple times. Once a stream is committed, data in the stream becomes available for read operations.</td>
147+
* <td>
148+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
149+
* <ul>
150+
* <li><p> batchCommitWriteStreams(BatchCommitWriteStreamsRequest request)
151+
* </ul>
152+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
153+
* <ul>
154+
* <li><p> batchCommitWriteStreams(TableName parent)
155+
* <li><p> batchCommitWriteStreams(String parent)
156+
* </ul>
157+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
158+
* <ul>
159+
* <li><p> batchCommitWriteStreamsCallable()
160+
* </ul>
161+
* </td>
162+
* </tr>
163+
* <tr>
164+
* <td><p> FlushRows</td>
165+
* <td><p> Flushes rows to a BUFFERED stream.
166+
* <p> If users are appending rows to BUFFERED stream, flush operation is required in order for the rows to become available for reading. A Flush operation flushes up to any previously flushed offset in a BUFFERED stream, to the offset specified in the request.
167+
* <p> Flush is not supported on the _default stream, since it is not BUFFERED.</td>
168+
* <td>
169+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
170+
* <ul>
171+
* <li><p> flushRows(FlushRowsRequest request)
172+
* </ul>
173+
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
174+
* <ul>
175+
* <li><p> flushRows(WriteStreamName writeStream)
176+
* <li><p> flushRows(String writeStream)
177+
* </ul>
178+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
179+
* <ul>
180+
* <li><p> flushRowsCallable()
181+
* </ul>
182+
* </td>
183+
* </tr>
184+
* </table>
69185
*
70186
* <p>See the individual methods for example code.
71187
*

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryReadStubSettings.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,21 @@ public BigQueryReadStub createStub() throws IOException {
126126
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
127127
}
128128

129+
/** Returns the endpoint set by the user or the the service's default endpoint. */
130+
@Override
131+
public String getEndpoint() {
132+
if (super.getEndpoint() != null) {
133+
return super.getEndpoint();
134+
}
135+
return getDefaultEndpoint();
136+
}
137+
138+
/** Returns the default service name. */
139+
@Override
140+
public String getServiceName() {
141+
return "bigquerystorage";
142+
}
143+
129144
/** Returns a builder for the default ExecutorProvider for this service. */
130145
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
131146
return InstantiatingExecutorProvider.newBuilder();
@@ -302,7 +317,6 @@ private static Builder createDefault() {
302317
builder.setTransportChannelProvider(defaultTransportChannelProvider());
303318
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
304319
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
305-
builder.setEndpoint(getDefaultEndpoint());
306320
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
307321
builder.setSwitchToMtlsEndpointAllowed(true);
308322

@@ -361,6 +375,15 @@ public Builder applyToAllUnaryMethods(
361375
return splitReadStreamSettings;
362376
}
363377

378+
/** Returns the endpoint set by the user or the the service's default endpoint. */
379+
@Override
380+
public String getEndpoint() {
381+
if (super.getEndpoint() != null) {
382+
return super.getEndpoint();
383+
}
384+
return getDefaultEndpoint();
385+
}
386+
364387
@Override
365388
public BigQueryReadStubSettings build() throws IOException {
366389
return new BigQueryReadStubSettings(this);

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/stub/BigQueryWriteStubSettings.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,21 @@ public BigQueryWriteStub createStub() throws IOException {
152152
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
153153
}
154154

155+
/** Returns the endpoint set by the user or the the service's default endpoint. */
156+
@Override
157+
public String getEndpoint() {
158+
if (super.getEndpoint() != null) {
159+
return super.getEndpoint();
160+
}
161+
return getDefaultEndpoint();
162+
}
163+
164+
/** Returns the default service name. */
165+
@Override
166+
public String getServiceName() {
167+
return "bigquerystorage";
168+
}
169+
155170
/** Returns a builder for the default ExecutorProvider for this service. */
156171
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
157172
return InstantiatingExecutorProvider.newBuilder();
@@ -355,7 +370,6 @@ private static Builder createDefault() {
355370
builder.setTransportChannelProvider(defaultTransportChannelProvider());
356371
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
357372
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
358-
builder.setEndpoint(getDefaultEndpoint());
359373
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
360374
builder.setSwitchToMtlsEndpointAllowed(true);
361375

@@ -441,6 +455,15 @@ public UnaryCallSettings.Builder<FlushRowsRequest, FlushRowsResponse> flushRowsS
441455
return flushRowsSettings;
442456
}
443457

458+
/** Returns the endpoint set by the user or the the service's default endpoint. */
459+
@Override
460+
public String getEndpoint() {
461+
if (super.getEndpoint() != null) {
462+
return super.getEndpoint();
463+
}
464+
return getDefaultEndpoint();
465+
}
466+
444467
@Override
445468
public BigQueryWriteStubSettings build() throws IOException {
446469
return new BigQueryWriteStubSettings(this);

0 commit comments

Comments
 (0)