Skip to content

Commit

Permalink
fix(deps): Update the Java code generator (gapic-generator-java) to 2…
Browse files Browse the repository at this point in the history
….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: googleapis/googleapis-gen@d86ba5b
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: googleapis/googleapis-gen@01713f3
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: googleapis/googleapis-gen@a10ed6a
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 25, 2024
1 parent 2d8245f commit 542b946
Show file tree
Hide file tree
Showing 164 changed files with 1,650 additions and 403 deletions.
Expand Up @@ -53,19 +53,62 @@
* such as threads. In the example above, try-with-resources is used, which automatically calls
* close().
*
* <p>The surface of this class includes several types of Java methods for each of the API's
* methods:
*
* <ol>
* <li>A "flattened" method. With this type of method, the fields of the request type have been
* converted into function parameters. It may be the case that not all fields are available as
* parameters, and not every API method will have a flattened method entry point.
* <li>A "request object" method. This type of method only takes one parameter, a request object,
* which must be constructed before the call. Not every API method will have a request object
* method.
* <li>A "callable" method. This type of method takes no parameters and returns an immutable API
* callable object, which can be used to initiate calls to the service.
* </ol>
* <table>
* <caption>Methods</caption>
* <tr>
* <th>Method</th>
* <th>Description</th>
* <th>Method Variants</th>
* </tr>
* <tr>
* <td><p> CreateReadSession</td>
* <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.
* <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.
* <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.
* <p> Read sessions automatically expire 6 hours after they are created and do not require manual clean-up by the caller.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> createReadSession(CreateReadSessionRequest request)
* </ul>
* <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>
* <ul>
* <li><p> createReadSession(ProjectName parent, ReadSession readSession, int maxStreamCount)
* <li><p> createReadSession(String parent, ReadSession readSession, int maxStreamCount)
* </ul>
* <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>
* <ul>
* <li><p> createReadSessionCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> ReadRows</td>
* <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.
* <p> Each request also returns a set of stream statistics reflecting the current state of the stream.</td>
* <td>
* <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>
* <ul>
* <li><p> readRowsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> SplitReadStream</td>
* <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.
* <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>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> splitReadStream(SplitReadStreamRequest request)
* </ul>
* <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>
* <ul>
* <li><p> splitReadStreamCallable()
* </ul>
* </td>
* </tr>
* </table>
*
* <p>See the individual methods for example code.
*
Expand Down
Expand Up @@ -53,19 +53,135 @@
* <p>Note: close() needs to be called on the BigQueryWriteClient object to clean up resources such
* as threads. In the example above, try-with-resources is used, which automatically calls close().
*
* <p>The surface of this class includes several types of Java methods for each of the API's
* methods:
*
* <ol>
* <li>A "flattened" method. With this type of method, the fields of the request type have been
* converted into function parameters. It may be the case that not all fields are available as
* parameters, and not every API method will have a flattened method entry point.
* <li>A "request object" method. This type of method only takes one parameter, a request object,
* which must be constructed before the call. Not every API method will have a request object
* method.
* <li>A "callable" method. This type of method takes no parameters and returns an immutable API
* callable object, which can be used to initiate calls to the service.
* </ol>
* <table>
* <caption>Methods</caption>
* <tr>
* <th>Method</th>
* <th>Description</th>
* <th>Method Variants</th>
* </tr>
* <tr>
* <td><p> CreateWriteStream</td>
* <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>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> createWriteStream(CreateWriteStreamRequest request)
* </ul>
* <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>
* <ul>
* <li><p> createWriteStream(TableName parent, WriteStream writeStream)
* <li><p> createWriteStream(String parent, WriteStream writeStream)
* </ul>
* <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>
* <ul>
* <li><p> createWriteStreamCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> AppendRows</td>
* <td><p> Appends data to the given stream.
* <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.
* <p> The response contains an optional offset at which the append happened. No offset information will be returned for appends to a default stream.
* <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.
* <p> The specifics of when successfully appended data is made visible to the table are governed by the type of stream:
* <ul>
* <li> For COMMITTED streams (which includes the default stream), data is visible immediately upon successful append.
* </ul>
* <ul>
* <li> For BUFFERED streams, data is made visible via a subsequent `FlushRows` rpc which advances a cursor to a newer offset in the stream.
* </ul>
* <ul>
* <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.
* </ul></td>
* <td>
* <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>
* <ul>
* <li><p> appendRowsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> GetWriteStream</td>
* <td><p> Gets information about a write stream.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> getWriteStream(GetWriteStreamRequest request)
* </ul>
* <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>
* <ul>
* <li><p> getWriteStream(WriteStreamName name)
* <li><p> getWriteStream(String name)
* </ul>
* <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>
* <ul>
* <li><p> getWriteStreamCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> FinalizeWriteStream</td>
* <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>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> finalizeWriteStream(FinalizeWriteStreamRequest request)
* </ul>
* <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>
* <ul>
* <li><p> finalizeWriteStream(WriteStreamName name)
* <li><p> finalizeWriteStream(String name)
* </ul>
* <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>
* <ul>
* <li><p> finalizeWriteStreamCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> BatchCommitWriteStreams</td>
* <td><p> Atomically commits a group of `PENDING` streams that belong to the same `parent` table.
* <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>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> batchCommitWriteStreams(BatchCommitWriteStreamsRequest request)
* </ul>
* <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>
* <ul>
* <li><p> batchCommitWriteStreams(TableName parent)
* <li><p> batchCommitWriteStreams(String parent)
* </ul>
* <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>
* <ul>
* <li><p> batchCommitWriteStreamsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> FlushRows</td>
* <td><p> Flushes rows to a BUFFERED stream.
* <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.
* <p> Flush is not supported on the _default stream, since it is not BUFFERED.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> flushRows(FlushRowsRequest request)
* </ul>
* <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>
* <ul>
* <li><p> flushRows(WriteStreamName writeStream)
* <li><p> flushRows(String writeStream)
* </ul>
* <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>
* <ul>
* <li><p> flushRowsCallable()
* </ul>
* </td>
* </tr>
* </table>
*
* <p>See the individual methods for example code.
*
Expand Down
Expand Up @@ -126,6 +126,21 @@ public BigQueryReadStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

/** Returns the default service name. */
@Override
public String getServiceName() {
return "bigquerystorage";
}

/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return InstantiatingExecutorProvider.newBuilder();
Expand Down Expand Up @@ -302,7 +317,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

Expand Down Expand Up @@ -361,6 +375,15 @@ public Builder applyToAllUnaryMethods(
return splitReadStreamSettings;
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

@Override
public BigQueryReadStubSettings build() throws IOException {
return new BigQueryReadStubSettings(this);
Expand Down
Expand Up @@ -152,6 +152,21 @@ public BigQueryWriteStub createStub() throws IOException {
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

/** Returns the default service name. */
@Override
public String getServiceName() {
return "bigquerystorage";
}

/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return InstantiatingExecutorProvider.newBuilder();
Expand Down Expand Up @@ -355,7 +370,6 @@ private static Builder createDefault() {
builder.setTransportChannelProvider(defaultTransportChannelProvider());
builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
builder.setEndpoint(getDefaultEndpoint());
builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
builder.setSwitchToMtlsEndpointAllowed(true);

Expand Down Expand Up @@ -441,6 +455,15 @@ public UnaryCallSettings.Builder<FlushRowsRequest, FlushRowsResponse> flushRowsS
return flushRowsSettings;
}

/** Returns the endpoint set by the user or the the service's default endpoint. */
@Override
public String getEndpoint() {
if (super.getEndpoint() != null) {
return super.getEndpoint();
}
return getDefaultEndpoint();
}

@Override
public BigQueryWriteStubSettings build() throws IOException {
return new BigQueryWriteStubSettings(this);
Expand Down

0 comments on commit 542b946

Please sign in to comment.