Comments (9)
com.google.api.gax.* should be shaded/relocated in our connector, but isn't shaded in your stack trace. Are you using gs://spark-lib/bigquery/spark-bigquery-latest.jar or building it yourself?
If you build it yourself you should use sbt assembly.
If you are compiling against it I would mark it provided and use our shaded jar.
from spark-bigquery-connector.
This is the same as #36. I think I will update the compilation instructions to compile against the seaded profile.
from spark-bigquery-connector.
@pmkc I am building it myself using sbt assembly, even though I am seeing this error.
from spark-bigquery-connector.
Can you give me your approximate build and run commands.
If you are compiling against the connector could you show me your build.sbt?
from spark-bigquery-connector.
my build command is sbt assembly
and this is how my build.sbt looks like,
name := "sparklib"
version := "0.1"
scalaVersion := "2.11.12"
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.4.0" % "provided"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.4.0" % "provided"
libraryDependencies += "org.apache.spark" %% "spark-hive" % "2.4.0" % "provided"
libraryDependencies += "com.typesafe" % "config" % "1.3.4" % "provided"
libraryDependencies += "log4j" % "log4j" % "1.2.15" excludeAll( ExclusionRule(organization = "com.sun.jdmk"), ExclusionRule(organization = "com.sun.jmx"), ExclusionRule(organization = "javax.jms") )
libraryDependencies += "com.google.cloud.bigdataoss" % "gcs-connector" % "hadoop2-1.9.17" % "provided"
libraryDependencies += "com.google.cloud.bigdataoss" % "bigquery-connector" % "hadoop2-0.13.5" % "provided"
libraryDependencies += "com.google.cloud.spark" %% "spark-bigquery" % "0.7.0-beta"
resolvers += Opts.resolver.sonatypeReleases
assemblyShadeRules in assembly := Seq(
ShadeRule.rename("com.google.common.**" -> "repackaged.com.google.common.@1").inAll,
ShadeRule.rename("com.google.protobuf.**" -> "repackaged.com.google.protobuf.@1").inAll
)
mainClass in assembly := some("LoadData")
assemblyJarName := "assembly_sparklib_2.11-0.1.jar"
from spark-bigquery-connector.
Could you try this?
ShadeRule.rename("com.google.guava.**" -> "repackaged.com.google.guava.@1").inAll,
ShadeRule.rename("com.google.common.guava.**" -> "repackaged.com.google.common.guava.@1").inAll,
ShadeRule.rename("com.google.protobuf.**" -> "repackaged.com.google.protobuf.@1").inAll
from spark-bigquery-connector.
I'm not actually sure why that is giving you a no such method for grpc, you could try sbt dependencyTree to find a conflict, but I would just side step that.
I would just mark "spark-bigquery" provided and use gs://spark-lib/bigquery/spark-bigquery-latest.jar OR compile against the shaded qualifier.
from spark-bigquery-connector.
@achelimed I am seeing same error even after applying shadeRules you mentioned above.
from spark-bigquery-connector.
This issue seems to be resolved in 0.8.0 release. Thank you @achelimed and @pmkc for your help.
from spark-bigquery-connector.
Related Issues (20)
- does spark read from bq multiple times when joining? HOT 2
- No enum constant com.google.cloud.spark.bigquery.PartitionOverwriteMode.dynamic HOT 2
- How many times a the bq connector hits a table in bigquery ? HOT 1
- Support spark 3.5 HOT 2
- Next release? HOT 1
- Bug: Enabling predicate pushdown fails HOT 2
- Unable to write in a BQ table, with the new spark connector update - issue persists HOT 9
- [question][hope-reply]: why here we use Java to implement spark-connector as for supporting spark datasourceV2 HOT 3
- Unable to write changed table to BigQuery with the new Spark Connector - 0.35.1 HOT 1
- How to configure `spark-bigquery` connector in KFP (Kubeflow) GCP DataProc operator which uses DataProc serverless under the hood? HOT 1
- Spark BQ connector doesn't work when reading table that is partitioned? HOT 5
- Support use of bigquery-emulator for integration testing
- Flakey behavior when writing to BigQuery HOT 4
- Clarification on Billing and Improved README.md Explanation HOT 1
- AWS Glue - Indirect write mode errors HOT 3
- Schema mismatch error needs to be more verbose
- INVALID_ARGUMENT When attempting to show df from BigQuery HOT 3
- Load failure caused by comment at top of query string (llegalArgumentException: Invalid Table ID) HOT 1
- BigQueryConnectorException: Error creating destination table HOT 5
- Unable to overwrite partition HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spark-bigquery-connector.