You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "mutianf (via GitHub)" <gi...@apache.org> on 2023/03/27 21:41:42 UTC

[GitHub] [beam] mutianf commented on a diff in pull request #25955: fix: Porting more BigtableOptions

mutianf commented on code in PR #25955:
URL: https://github.com/apache/beam/pull/25955#discussion_r1149817679


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableServiceImpl.java:
##########
@@ -93,12 +93,32 @@ class BigtableServiceImpl implements BigtableService {
   private static final long MIN_BYTE_BUFFER_SIZE = 100 * 1024 * 1024; // 100MB
 
   public BigtableServiceImpl(BigtableDataSettings settings) throws IOException {
-    this.client = BigtableDataClient.create(settings);
+    this(settings, null);
+  }
+
+  public BigtableServiceImpl(BigtableDataSettings settings, Duration readWaitTimeout)
+      throws IOException {
     this.projectId = settings.getProjectId();
     this.instanceId = settings.getInstanceId();
     RetrySettings retry = settings.getStubSettings().readRowsSettings().getRetrySettings();
     this.readAttemptTimeout = Duration.millis(retry.getInitialRpcTimeout().toMillis());
     this.readOperationTimeout = Duration.millis(retry.getTotalTimeout().toMillis());
+    BigtableDataSettings.Builder builder = settings.toBuilder();
+    if (readWaitTimeout != null) {
+      // TODO: a hack to workaround incorrect mapping from attempt timeout to watchdogs wait
+      // timeout. This can be removed once
+      // https://github.com/googleapis/gapic-generator-java/pull/1473 is resolved.

Review Comment:
   This class is package private, would it still be a breaking change? I also made the constructors package private. 



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org