You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a pyspark job that writes streaming data to BigQuery and I needed this Library: com.google.cloud.bigdataoss:gcs-connector:hadoop3-2.2.10 which has guava as a dependency.
However, when I run the code that writes the streaming dataframe to BigQuery I keep getting an error with the class Preconditions from guava, here is the error:
Caused by: java.lang.NoSuchMethodError: 'void com.google.common.base.Preconditions.checkState(boolean, java.lang.String, long)'
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageReadOptions$Builder.build(GoogleCloudStorageReadOptions.java:236)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageReadOptions.<clinit>(GoogleCloudStorageReadOptions.java:56)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageOptions.builder(GoogleCloudStorageOptions.java:134)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageOptions.<clinit>(GoogleCloudStorageOptions.java:114)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemConfiguration.<clinit>(GoogleHadoopFileSystemConfiguration.java:356)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.<init>(GoogleHadoopFileSystemBase.java:248)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem.<init>(GoogleHadoopFileSystem.java:58)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS.<init>(GoogleHadoopFS.java:54)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:76)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:53)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
at org.apache.hadoop.fs.AbstractFileSystem.newInstance(AbstractFileSystem.java:143)
... 75 more
I have doubts that the reason is my Java version which is: 17.0.9
Python Version: 3.12.1
guava release that is used as a dependency: 32.1.2
I checked the source code and the function CheckState exists with same argument, so what is the problem? is it Java version?
Caused by: java.lang.NoSuchMethodError: 'void com.google.common.base.Preconditions.checkState(boolean, java.lang.String, long)'
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageReadOptions$Builder.build(GoogleCloudStorageReadOptions.java:236)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageReadOptions.<clinit>(GoogleCloudStorageReadOptions.java:56)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageOptions.builder(GoogleCloudStorageOptions.java:134)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageOptions.<clinit>(GoogleCloudStorageOptions.java:114)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemConfiguration.<clinit>(GoogleHadoopFileSystemConfiguration.java:356)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystemBase.<init>(GoogleHadoopFileSystemBase.java:248)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem.<init>(GoogleHadoopFileSystem.java:58)
at com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS.<init>(GoogleHadoopFS.java:54)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:76)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:53)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
at org.apache.hadoop.fs.AbstractFileSystem.newInstance(AbstractFileSystem.java:143)
... 75 more
Description
Hello,
I am creating a pyspark job that writes streaming data to BigQuery and I needed this Library: com.google.cloud.bigdataoss:gcs-connector:hadoop3-2.2.10 which has guava as a dependency.
However, when I run the code that writes the streaming dataframe to BigQuery I keep getting an error with the class Preconditions from guava, here is the error:
I have doubts that the reason is my Java version which is: 17.0.9
Python Version: 3.12.1
guava release that is used as a dependency: 32.1.2
I checked the source code and the function CheckState exists with same argument, so what is the problem? is it Java version?
Example
Expected Behavior
To be able to use the dependency correctly
Actual Behavior
Error:
Packages
com.google.common.base
Platforms
Java 17
Checklist
The text was updated successfully, but these errors were encountered: