diff --git a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageClient.java b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageClient.java index ec5b048992c7..357997fc79d3 100644 --- a/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageClient.java +++ b/google-cloud-clients/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageClient.java @@ -203,7 +203,6 @@ public final ReadSession createReadSession( return createReadSession(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * 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 @@ -237,7 +236,6 @@ public final ReadSession createReadSession(CreateReadSessionRequest request) { return createReadSessionCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * 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 @@ -270,7 +268,6 @@ public final UnaryCallable createReadSess return stub.createReadSessionCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Reads rows from the table in the format prescribed by the read session. Each response contains * one or more table rows, up to a maximum of 10 MiB per response; read requests which attempt to @@ -301,7 +298,6 @@ public final ServerStreamingCallable readRows return stub.readRowsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates additional streams for a ReadSession. This API can be used to dynamically adjust the * parallelism of a batch processing task upwards by adding additional workers. @@ -333,7 +329,6 @@ public final BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams return batchCreateReadSessionStreams(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates additional streams for a ReadSession. This API can be used to dynamically adjust the * parallelism of a batch processing task upwards by adding additional workers. @@ -360,7 +355,6 @@ public final BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams return batchCreateReadSessionStreamsCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates additional streams for a ReadSession. This API can be used to dynamically adjust the * parallelism of a batch processing task upwards by adding additional workers. @@ -387,7 +381,6 @@ public final BatchCreateReadSessionStreamsResponse batchCreateReadSessionStreams return stub.batchCreateReadSessionStreamsCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Triggers the graceful termination of a single stream in a ReadSession. This API can be used to * dynamically adjust the parallelism of a batch processing task downwards without losing data. @@ -418,7 +411,6 @@ public final void finalizeStream(Stream stream) { finalizeStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Triggers the graceful termination of a single stream in a ReadSession. This API can be used to * dynamically adjust the parallelism of a batch processing task downwards without losing data. @@ -451,7 +443,6 @@ public final void finalizeStream(FinalizeStreamRequest request) { finalizeStreamCallable().call(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Triggers the graceful termination of a single stream in a ReadSession. This API can be used to * dynamically adjust the parallelism of a batch processing task downwards without losing data. @@ -483,7 +474,6 @@ public final UnaryCallable finalizeStreamCallable( return stub.finalizeStreamCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Splits a given read stream into two Streams. These streams are referred to as the primary and * the residual of the split. The original stream can still be read from in the same manner as @@ -501,21 +491,24 @@ public final UnaryCallable finalizeStreamCallable( * *

    * try (BigQueryStorageClient bigQueryStorageClient = BigQueryStorageClient.create()) {
-   *   Stream originalStream = Stream.newBuilder().build();
+   *   Stream originalStream = getStream();
    *   SplitReadStreamResponse response = bigQueryStorageClient.splitReadStream(originalStream);
    * }
    * 
* * @param originalStream Stream to split. * @throws com.google.api.gax.rpc.ApiException if the remote call fails + * @deprecated Use {@link BigQueryStorageClient#splitReadStream(SplitReadStreamRequest)}. */ public final SplitReadStreamResponse splitReadStream(Stream originalStream) { SplitReadStreamRequest request = - SplitReadStreamRequest.newBuilder().setOriginalStream(originalStream).build(); + SplitReadStreamRequest.newBuilder() + .setOriginalStream(originalStream) + .setFraction(0.5f) + .build(); return splitReadStream(request); } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Splits a given read stream into two Streams. These streams are referred to as the primary and * the residual of the split. The original stream can still be read from in the same manner as @@ -533,9 +526,10 @@ public final SplitReadStreamResponse splitReadStream(Stream originalStream) { * *

    * try (BigQueryStorageClient bigQueryStorageClient = BigQueryStorageClient.create()) {
-   *   Stream originalStream = Stream.newBuilder().build();
+   *   Stream originalStream = getStream()
    *   SplitReadStreamRequest request = SplitReadStreamRequest.newBuilder()
    *     .setOriginalStream(originalStream)
+   *     .setFraction(0.5f)
    *     .build();
    *   SplitReadStreamResponse response = bigQueryStorageClient.splitReadStream(request);
    * }
@@ -548,7 +542,6 @@ public final SplitReadStreamResponse splitReadStream(SplitReadStreamRequest requ
     return splitReadStreamCallable().call(request);
   }
 
-  // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
    * Splits a given read stream into two Streams. These streams are referred to as the primary and
    * the residual of the split. The original stream can still be read from in the same manner as