This repository was archived by the owner on Feb 24, 2026. It is now read-only.
feat: create manual client for Write API#112
Merged
stephaniewang526 merged 36 commits intogoogleapis:masterfrom Apr 3, 2020
yirutang:work
Merged
feat: create manual client for Write API#112stephaniewang526 merged 36 commits intogoogleapis:masterfrom yirutang:work
stephaniewang526 merged 36 commits intogoogleapis:masterfrom
yirutang:work
Conversation
First version, test to be developed.
…brary helps to convert a ProtoDescriptorProto out of ProtoDescriptor into a self contained ProtoDescriptorProto, that can be passed into API and reconstructed on the server side. modified: google-cloud-bigquerystorage/pom.xml new file: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverter.java new file: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverterTest.java new file: google-cloud-bigquerystorage/src/test/proto/test.proto modified: pom.xml
First version, test to be developed.
modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/FakeBigQueryWriteImpl.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/FakeScheduledExecutorService.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java
modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
============================================
+ Coverage 72.36% 73.88% +1.52%
- Complexity 281 319 +38
============================================
Files 39 42 +3
Lines 1809 2229 +420
Branches 4 70 +66
============================================
+ Hits 1309 1647 +338
- Misses 496 552 +56
- Partials 4 30 +26
Continue to review full report at Codecov.
|
Contributor
|
please take a look at the various build failures. |
…work modified: google-cloud-bigquerystorage/pom.xml modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java modified: google-cloud-bigquerystorage/src/test/proto/test.proto modified: google-cloud-bigquerystorage/pom.xml modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java modified: google-cloud-bigquerystorage/src/test/proto/test.proto
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Outdated
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Outdated
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Outdated
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Show resolved
Hide resolved
Contributor
|
As a general note, all |
stephaniewang526
suggested changes
Mar 31, 2020
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Outdated
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Show resolved
Hide resolved
...d-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java
Show resolved
Hide resolved
...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java
Outdated
Show resolved
Hide resolved
...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java
Outdated
Show resolved
Hide resolved
...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java
Outdated
Show resolved
Hide resolved
...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java
Outdated
Show resolved
Hide resolved
...test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java
Outdated
Show resolved
Hide resolved
...test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java
Show resolved
Hide resolved
…gquery/storage/v1alpha2/Waiter.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com>
…gquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com>
…gquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com>
yirutang
commented
Apr 1, 2020
...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java
Outdated
Show resolved
Hide resolved
...e-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java
Outdated
Show resolved
Hide resolved
stephaniewang526
approved these changes
Apr 2, 2020
remove dupe gax; add undeclared commons-lang3
yoshi-automation
added a commit
that referenced
this pull request
Apr 3, 2020
98851e9 commit 98851e9 Author: Yiru Tang <yiru@google.com> Date: Thu Apr 2 17:45:37 2020 -0700 feat: create manual client for Write API (#112) * First writeapi manual client First version, test to be developed. * Manual client with e2e * StreamWriter library * ProtoSchema convert library WriteApi client library addition. This library helps to convert a ProtoDescriptorProto out of ProtoDescriptor into a self contained ProtoDescriptorProto, that can be passed into API and reconstructed on the server side. modified: google-cloud-bigquerystorage/pom.xml new file: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverter.java new file: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverterTest.java new file: google-cloud-bigquerystorage/src/test/proto/test.proto modified: pom.xml * First writeapi manual client First version, test to be developed. * . * incremental development * . modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/FakeBigQueryWriteImpl.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/FakeScheduledExecutorService.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java * . * . * . * feat: create manual java client for writeapi modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java * feat: add integration test final verification. * . * . modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java * . * . * . * . * avoid duplicate count++ and make it easier to read * Update google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com> * Update google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com> * Update google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com> * . * . * . * . * . * dep: add undeclared dep in parent pom * dep: remove duplicate and add undeclared remove dupe gax; add undeclared commons-lang3 Co-authored-by: Stephanie Wang <stephaniewang526@users.noreply.github.com>
stephaniewang526
pushed a commit
that referenced
this pull request
Apr 3, 2020
…nerator. (#134) * feat: create manual client for Write API (#112) 98851e9 commit 98851e9 Author: Yiru Tang <yiru@google.com> Date: Thu Apr 2 17:45:37 2020 -0700 feat: create manual client for Write API (#112) * First writeapi manual client First version, test to be developed. * Manual client with e2e * StreamWriter library * ProtoSchema convert library WriteApi client library addition. This library helps to convert a ProtoDescriptorProto out of ProtoDescriptor into a self contained ProtoDescriptorProto, that can be passed into API and reconstructed on the server side. modified: google-cloud-bigquerystorage/pom.xml new file: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverter.java new file: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverterTest.java new file: google-cloud-bigquerystorage/src/test/proto/test.proto modified: pom.xml * First writeapi manual client First version, test to be developed. * . * incremental development * . modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/FakeBigQueryWriteImpl.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/FakeScheduledExecutorService.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriterTest.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java * . * . * . * feat: create manual java client for writeapi modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java * feat: add integration test final verification. * . * . modified: google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/StreamWriter.java modified: google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java * . * . * . * . * avoid duplicate count++ and make it easier to read * Update google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/Waiter.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com> * Update google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com> * Update google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/it/ITBigQueryWriteManualClientTest.java Co-Authored-By: Stephanie Wang <stephaniewang526@users.noreply.github.com> * . * . * . * . * . * dep: add undeclared dep in parent pom * dep: remove duplicate and add undeclared remove dupe gax; add undeclared commons-lang3 Co-authored-by: Stephanie Wang <stephaniewang526@users.noreply.github.com> * deps: update dependency io.grpc:grpc-bom to v1.28.1 (#132) 711c5c7 commit 711c5c7 Author: WhiteSource Renovate <bot@renovateapp.com> Date: Fri Apr 3 03:08:41 2020 +0200 deps: update dependency io.grpc:grpc-bom to v1.28.1 (#132) * chore: release 0.127.0 (#122) 45fc919 commit 45fc919 Author: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Date: Thu Apr 2 21:49:46 2020 -0400 chore: release 0.127.0 (#122) * updated CHANGELOG.md [ci skip] * updated README.md [ci skip] * updated versions.txt [ci skip] * updated google-cloud-bigquerystorage-bom/pom.xml [ci skip] * updated grpc-google-cloud-bigquerystorage-v1/pom.xml [ci skip] * updated grpc-google-cloud-bigquerystorage-v1alpha2/pom.xml [ci skip] * updated grpc-google-cloud-bigquerystorage-v1beta1/pom.xml [ci skip] * updated grpc-google-cloud-bigquerystorage-v1beta2/pom.xml [ci skip] * updated proto-google-cloud-bigquerystorage-v1/pom.xml [ci skip] * updated proto-google-cloud-bigquerystorage-v1alpha2/pom.xml [ci skip] * updated proto-google-cloud-bigquerystorage-v1beta1/pom.xml [ci skip] * updated proto-google-cloud-bigquerystorage-v1beta2/pom.xml [ci skip] * updated samples/install-without-bom/pom.xml [ci skip] * updated samples/pom.xml [ci skip] * updated samples/snapshot/pom.xml [ci skip] * updated samples/snippets/pom.xml [ci skip] * updated google-cloud-bigquerystorage/pom.xml [ci skip] * updated pom.xml [ci skip] Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
shubhwip
pushed a commit
to shubhwip/java-bigquerystorage
that referenced
this pull request
Oct 7, 2023
….0 (googleapis#112) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `5.3.0` -> `5.4.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/java-storage-nio).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #111 ☕️
A StreamWriter that provides built-in capabilities to help making bi-di streaming client easy to use:
Example:
WriteStream writeStream =
client.createWriteStream(
CreateWriteStreamRequest.newBuilder()
.setParent(tableId2)
.setWriteStream(WriteStream.newBuilder().setType(WriteStream.Type.PENDING).build())
.build());
StreamWriter streamWriter = StreamWriter.newBuilder(writeStream.getName()).build();
ApiFuture response =
streamWriter.append(
createAppendRequestComplicateType(writeStream.getName(), new String[] {"aaa"})
.setOffset(Int64Value.of(0L))
.build());
assertEquals(0, response.get().getOffset());
streamWriter.shutdown();
}