You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/03/04 23:42:30 UTC

[GitHub] [beam] kmjung commented on a change in pull request #13896: [BEAM-11326] Add a deadline of 30s to SplitReadStream

kmjung commented on a change in pull request #13896:
URL: https://github.com/apache/beam/pull/13896#discussion_r587914843



##########
File path: sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServicesImpl.java
##########
@@ -1175,18 +1174,31 @@ private StorageClientImpl(BigQueryOptions options) throws IOException {
                       .build());
 
       UnaryCallSettings.Builder<CreateReadSessionRequest, ReadSession> createReadSessionSettings =
-          builder.getStubSettingsBuilder().createReadSessionSettings();
+          settingsBuilder.getStubSettingsBuilder().createReadSessionSettings();
 
-      RetrySettings.Builder retrySettings =
+      createReadSessionSettings.setRetrySettings(
           createReadSessionSettings
               .getRetrySettings()
               .toBuilder()
               .setInitialRpcTimeout(org.threeten.bp.Duration.ofHours(2))
               .setMaxRpcTimeout(org.threeten.bp.Duration.ofHours(2))
-              .setTotalTimeout(org.threeten.bp.Duration.ofHours(2));
+              .setTotalTimeout(org.threeten.bp.Duration.ofHours(2))
+              .build());
 
-      createReadSessionSettings.setRetrySettings(retrySettings.build());
-      this.client = BigQueryReadClient.create(builder.build());
+      UnaryCallSettings.Builder<SplitReadStreamRequest, SplitReadStreamResponse>
+          splitReadStreamSettings =
+              settingsBuilder.getStubSettingsBuilder().splitReadStreamSettings();
+
+      splitReadStreamSettings.setRetrySettings(
+          splitReadStreamSettings
+              .getRetrySettings()
+              .toBuilder()
+              .setInitialRpcTimeout(org.threeten.bp.Duration.ofSeconds(30))
+              .setMaxRpcTimeout(org.threeten.bp.Duration.ofSeconds(30))
+              .setTotalTimeout(org.threeten.bp.Duration.ofSeconds(30))
+              .build());

Review comment:
       I think the existing code is correct. @stephaniewang526 can you confirm?




----------------------------------------------------------------
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:
users@infra.apache.org