Skip to content
Permalink
Browse files
fix: remove dependency on google-cloud-bigquery (cyclic dep) (#1295)
Fixes #1249
  • Loading branch information
stephaniewang526 committed Sep 9, 2021
1 parent 0e749d9 commit 7ac47de0ad5a37fcc7bbb6ea7ce0f5b7e59d276c
Showing with 160 additions and 1,762 deletions.
  1. +2 −2 .kokoro/dependencies.sh
  2. +19 −0 google-cloud-bigquerystorage/clirr-ignored-differences.xml
  3. +1 −0 google-cloud-bigquerystorage/pom.xml
  4. +0 −85 ...uerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/BQV2ToBQStorageConverter.java
  5. +0 −18 ...oud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter.java
  6. +0 −543 ...-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/SchemaCompatibility.java
  7. +0 −62 ...storage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/BQV2ToBQStorageConverterTest.java
  8. +3 −9 ...bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriterTest.java
  9. +0 −1,015 ...querystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/SchemaCompatibilityTest.java
  10. +27 −2 .../java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryBigDecimalByteStringEncoderTest.java
  11. +27 −2 ...storage/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryTimeEncoderTest.java
  12. +25 −2 ...e/src/test/java/com/google/cloud/bigquery/storage/v1beta2/it/ITBigQueryWriteManualClientTest.java
  13. +1 −0 owlbot.py
  14. +6 −5 pom.xml
  15. +5 −1 samples/install-without-bom/pom.xml
  16. +5 −0 samples/snapshot/pom.xml
  17. +5 −1 samples/snippets/pom.xml
  18. +14 −12 samples/snippets/src/main/java/com/example/bigquerystorage/WriteToDefaultStream.java
  19. +20 −3 samples/snippets/src/test/java/com/example/bigquerystorage/WriteToDefaultStreamIT.java
@@ -47,11 +47,11 @@ function completenessCheck() {
# This is stripped from the output as it is not present in the flattened pom.
# Only dependencies with 'compile' or 'runtime' scope are included from original dependency list.
msg "Generating dependency list using original pom..."
mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt
mvn dependency:list -f pom.xml -DincludeScope=runtime -DexcludeArtifactIds=gson,commons-codec,commons-logging,opencensus-contrib-http-util,httpclient,httpcore -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt

# Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes)
msg "Generating dependency list using flattened pom..."
mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt
mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -DexcludeArtifactIds=gson,commons-codec,commons-logging,opencensus-contrib-http-util,httpclient,httpcore -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt

# Compare two dependency lists
msg "Comparing dependency lists..."
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/bigquery/storage/v1beta2/BQV2ToBQStorageConverter</className>
<method>com.google.cloud.bigquery.storage.v1beta2.BQV2ToBQStorageConverter</method>
</difference>
<difference>
<differenceType>8001</differenceType>
<className>com/google/cloud/bigquery/storage/v1beta2/SchemaCompatibility</className>
<method>com.google.cloud.bigquery.storage.v1beta2.SchemaCompatibility</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/bigquery/storage/v1beta2/JsonStreamWriter</className>
<method>com.google.cloud.bigquery.storage.v1beta2.JsonStreamWriter$Builder newBuilder(java.lang.String, com.google.cloud.bigquery.Schema)</method>
</difference>
</differences>
@@ -146,6 +146,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>

This file was deleted.

@@ -19,7 +19,6 @@
import com.google.api.gax.batching.FlowControlSettings;
import com.google.api.gax.core.CredentialsProvider;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.cloud.bigquery.Schema;
import com.google.common.base.Preconditions;
import com.google.protobuf.Descriptors;
import com.google.protobuf.Descriptors.Descriptor;
@@ -202,23 +201,6 @@ public static Builder newBuilder(String streamOrTableName, TableSchema tableSche
return new Builder(streamOrTableName, tableSchema, null);
}

/**
* newBuilder that constructs a JsonStreamWriter builder with BigQuery client being initialized by
* StreamWriter by default.
*
* @param streamOrTableName name of the stream that must follow
* "projects/[^/]+/datasets/[^/]+/tables/[^/]+/streams/[^/]+"
* @param tableSchema The schema of the table when the stream was created, which is passed back
* through {@code WriteStream}
* @return Builder
*/
public static Builder newBuilder(String streamOrTableName, Schema tableSchema) {
Preconditions.checkNotNull(streamOrTableName, "StreamOrTableName is null.");
Preconditions.checkNotNull(tableSchema, "TableSchema is null.");
return new Builder(
streamOrTableName, BQV2ToBQStorageConverter.ConvertTableSchema(tableSchema), null);
}

/**
* newBuilder that constructs a JsonStreamWriter builder.
*

0 comments on commit 7ac47de

Please sign in to comment.