-
Notifications
You must be signed in to change notification settings - Fork 85
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: Create Stream writer v2 - starting with core logics #867
feat: Create Stream writer v2 - starting with core logics #867
Conversation
Compared to existing StreamWriter, its locking mechanism is much simpler.
...querystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2Test.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Outdated
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Outdated
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Outdated
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #867 +/- ##
============================================
+ Coverage 80.03% 80.64% +0.60%
- Complexity 979 1005 +26
============================================
Files 74 76 +2
Lines 5290 5430 +140
Branches 408 420 +12
============================================
+ Hits 4234 4379 +145
- Misses 872 878 +6
+ Partials 184 173 -11
Continue to review full report at Codecov.
|
...rystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/FakeBigQueryWriteImpl.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Show resolved
Hide resolved
...querystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2Test.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Show resolved
Hide resolved
...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java
Show resolved
Hide resolved
log.info("User closing stream: " + streamName); | ||
this.lock.lock(); | ||
try { | ||
this.userClosed = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding a local var to remember the previous value, so if user closed twice, the second time will be no_op (don't call the appendThread.join() multiple times).
|
||
if (localQueue.isEmpty()) { | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe be save a few lines of code here? it's useless according to context.
…onfig to v1.3.2 (googleapis#867) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.3.0` -> `1.3.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.2/compatibility-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.2/confidence-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-shared-config</summary> ### [`v1.3.2`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​132-httpsgithubcomgoogleapisjava-shared-configcomparev131v132-2022-03-28) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.3.1...v1.3.2) ### [`v1.3.1`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​131-httpsgithubcomgoogleapisjava-shared-configcomparev130v131-2022-03-25) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.3.0...v1.3.1) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-storage-nio).
Unblocks Dataflow sink test which unblocks customer update.