vachan-shetty commented on a change in pull request #13378:
URL: https://github.com/apache/beam/pull/13378#discussion_r526466788
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageStreamSource.java
##########
@@ -178,6 +179,7 @@ private BigQueryStorageStreamReader(
this.parseFn = source.parseFn;
this.storageClient = source.bqServices.getStorageClient(options);
this.tableSchema = fromJsonString(source.jsonTableSchema,
TableSchema.class);
+ this.splitPossible = true;
Review comment:
Done.
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageStreamSource.java
##########
@@ -288,78 +290,85 @@ public synchronized void close() {
return null;
}
- SplitReadStreamRequest splitRequest =
- SplitReadStreamRequest.newBuilder()
- .setName(source.readStream.getName())
- .setFraction((float) fraction)
- .build();
-
- SplitReadStreamResponse splitResponse =
storageClient.splitReadStream(splitRequest);
- if (!splitResponse.hasPrimaryStream() ||
!splitResponse.hasRemainderStream()) {
- // No more splits are possible!
- Metrics.counter(
- BigQueryStorageStreamReader.class,
- "split-at-fraction-calls-failed-due-to-impossible-split-point")
- .inc();
- LOG.info(
- "BigQuery Storage API stream {} cannot be split at {}.",
- source.readStream.getName(),
- fraction);
- return null;
- }
+ if (splitPossible) {
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]