-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add an enhanced layer for BigQuery Storage v1beta2 client #48
Conversation
This change adds a simple shim layer to the BigQuery Read API client. It is modeled after the shim layer in the BigQuery Storage API v1beta1, where the parameters are simple pass-throughs to the underlying gRPC client stub. The shim currently does nothing but read default values from the base client layer and pass them back through.
This change modifies the configuration for the v1beta2 ReadRows API to add a resumption strategy. The resumption strategy will allow the connection to be resumed transparently in the case of transient errors.
This whole "enhanced" infrastructure is just, at this point, to allow us to specify a resumption strategy in the default ReadRows settings? I'd really love to get away from this. @chingor13 @shollyman @stephaniewang526 -- any way we can get the codegen tool to do this for us? |
@mmladenovski should I wait to review until @kmjung's question gets answered? |
@emkornfield, please go ahead with a review. I am not sure how long it will take for automated resumption strategy generation. |
...e/src/main/java/com/google/cloud/bigquery/storage/v1beta2/stub/EnhancedBigQueryReadStub.java
Outdated
Show resolved
Hide resolved
...java/com/google/cloud/bigquery/storage/v1beta2/stub/readrows/ReadRowsResumptionStrategy.java
Show resolved
Hide resolved
...java/com/google/cloud/bigquery/storage/v1beta2/stub/readrows/ReadRowsResumptionStrategy.java
Show resolved
Hide resolved
...ystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/BigQueryReadClientTest.java
Show resolved
Hide resolved
...ystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/BigQueryReadClientTest.java
Show resolved
Hide resolved
Took a look at manual diffs provided offline and perused the code as is, overall looks OK to me. |
Codecov Report
@@ Coverage Diff @@
## master #48 +/- ##
=========================================
Coverage ? 71.11%
Complexity ? 197
=========================================
Files ? 28
Lines ? 1357
Branches ? 3
=========================================
Hits ? 965
Misses ? 389
Partials ? 3
Continue to review full report at Codecov.
|
…o v1-rev20191127-1.30.9 (googleapis#48)
This pull request creates an enhanced shim layer in the BigQuery Storage API v1beta2 client in order to apply a streaming resumption strategy for the ReadRows method.
The changes are similar to the PR for v1beta1: googleapis/google-cloud-java#4022. The difference is that a lot of the timeout and retry settings are now automatically applied on the base (auto-generated) client.
Some tips on how to review the PR and which files to compare:
EnhancedBigQueryReadStub.java
is based fromBigQueryReadStub.java
EnhancedBigQueryReadStubSettings.java
is based fromBigQueryReadStubSettings.java
BigQueryReadSettings.java
is based fromBaseBigQueryReadSettings.java
BigQueryReadClient.java
is based fromBaseBigQueryReadClient.java
@kmjung , @emkornfield, @aryann please review the changes.