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/23 19:52:15 UTC
[GitHub] [beam] mutianf opened a new pull request, #25955: fix: Porting more BigtableOptions
mutianf opened a new pull request, #25955:
URL: https://github.com/apache/beam/pull/25955
BigtableIO is migrated to use java-bigtable veneer client instead bigtable-client-core. As part of the effort, we ported over some of the BigtableOptions that could be configured by customers. This pr translates more BigtableOptions configurations to veneer settings.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
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
[GitHub] [beam] Abacn commented on a diff in pull request #25955: fix: Porting more BigtableOptions
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #25955:
URL: https://github.com/apache/beam/pull/25955#discussion_r1149721899
##########
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 chunk should be done along with assembling BigtableDataSettings before pass to the constructor of BigtableServiceImpl, then we do not need to add an temporary (from my understanding to this TODO) argument to the public BigtableServiceImpl constructor. Removing it later will be a breaking change.
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java:
##########
@@ -306,7 +306,9 @@ public abstract static class Read extends PTransform<PBegin, PCollection<Row>> {
/**
* Returns the Google Cloud Bigtable instance being read from, and other parameters.
*
- * @deprecated please use {@link #getBigtableReadOptions()}.
+ * @deprecated please set the configurations directly:
+ * BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId)
Review Comment:
What does this change mean? Is `getBigtableReadOptions()` no longer recommended also? The original `deprecated` message was clear and now it seems talking about another thing (set, instead of get configuration)
--
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
[GitHub] [beam] mutianf commented on a diff in pull request #25955: fix: Porting more BigtableOptions
Posted by "mutianf (via GitHub)" <gi...@apache.org>.
mutianf commented on code in PR #25955:
URL: https://github.com/apache/beam/pull/25955#discussion_r1149819426
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java:
##########
@@ -306,7 +306,9 @@ public abstract static class Read extends PTransform<PBegin, PCollection<Row>> {
/**
* Returns the Google Cloud Bigtable instance being read from, and other parameters.
*
- * @deprecated please use {@link #getBigtableReadOptions()}.
+ * @deprecated please set the configurations directly:
+ * BigtableIO.read().withProjectId(projectId).withInstanceId(instanceId).withTableId(tableId)
Review Comment:
Ah thanks, my bad.. However, BigtableReadOptions and BigtableWriteOptions are actually package private. Going forward we want customers to configure these options directly on BigtableIO.read() or write(), so there won't be one getter that'll show all the configuration. I updated the doc to use populateDisplayData instead, do you think this will work?
--
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
[GitHub] [beam] Abacn merged pull request #25955: fix: Porting more BigtableOptions
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #25955:
URL: https://github.com/apache/beam/pull/25955
--
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
[GitHub] [beam] Abacn commented on a diff in pull request #25955: fix: Porting more BigtableOptions
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #25955:
URL: https://github.com/apache/beam/pull/25955#discussion_r1150817477
##########
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:
Thanks!
--
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
[GitHub] [beam] Abacn commented on a diff in pull request #25955: fix: Porting more BigtableOptions
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on code in PR #25955:
URL: https://github.com/apache/beam/pull/25955#discussion_r1149823827
##########
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:
ah I see the need of taking another `readWaitTimeout` now. Thanks for clarification. Then probably add "TODO remove this overloaded contructor once ... is resolved" on top of `BigtableServiceImpl(BigtableDataSettings, Duration)` method?
--
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
[GitHub] [beam] mutianf commented on a diff in pull request #25955: fix: Porting more BigtableOptions
Posted by "mutianf (via GitHub)" <gi...@apache.org>.
mutianf commented on code in PR #25955:
URL: https://github.com/apache/beam/pull/25955#discussion_r1150806992
##########
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:
updated!
--
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
[GitHub] [beam] github-actions[bot] commented on pull request #25955: fix: Porting more BigtableOptions
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #25955:
URL: https://github.com/apache/beam/pull/25955#issuecomment-1481858722
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @lukecwik for label java.
R: @johnjcasey for label io.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
The PR bot will only process comments in the main thread (not review comments).
--
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
[GitHub] [beam] mutianf commented on a diff in pull request #25955: fix: Porting more BigtableOptions
Posted by "mutianf (via GitHub)" <gi...@apache.org>.
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