-
Notifications
You must be signed in to change notification settings - Fork 310
spark-avro 3.2.0 doesn't work with spark 2.2.0 (abstract OutputWriter.write) #240
Comments
I'm seeing this too. I think its from SPARK-19085 apache/spark@b3d3962 You get a compile error if you try to compile after changing the spark version to 2.2.0:
this was discussed in the PR for spark: apache/spark#16479 (comment) |
I'm also hitting this, would love to see the PR merged |
I got the same problem, any fix coming soon ? |
We're using the fix proposed in #242 and it seems to be working fine. You'll just have to build spark-avro with the patch applied and point your maven/gradle/whatever at the custom build rather than the released version. |
Is there any confirmation when this PR will be merged. We are facing this in production and would appreciate if this is released sooner. |
We have similar urgency as well. Do share when this PR will be merged. |
Since the PR has been already merged, is there any roadmap/timeline for the release? Custom build is always an option, but going the clean way feels way better :) Thank you! |
If you need it now, you can use the Jitpack build like this:
|
I understand there are work arounds, but what is blocking the release of this fix? |
+1 waiting for the release. meanwhile using @nightscape's suggestion. |
@nightscape's solution works! |
I know other people have asked, but is there a timeline for when the spark-avro release? |
We want to make a release, although the eng team is pretty swamped at the moment. For now please use the workaround provided above. |
+1 waiting for the release. I appreciate the engineering team's time! |
I have built the jar from the master branch. It is the 4.0.0 snapshot - what should my sbt dependency be to use this instead of the spark-avro 3.2.0? This error is coming up with Spark 2.2 and Redshift write operations |
On Building the jar from the master branch it gives me the spark-avro-assembly-4.0.0-SNAPSHOT.jar and if on the CDH cluster i replace the spark-avro-3.2.0 jar with this newly built jar from the master branch and then spark-submit with --jars having the new assembly jar then it is giving me LinkageError. Can you pls tell me how to solve this? What changes do i need to make in my sbt to point to this assembly jar? I have only passed it in the cluster as --jars Exception in thread "main" java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.spark.streaming.StreamingContext$.getOrCreate(Ljava/lang/String;Lscala/Function0;Lorg/apache/hadoop/conf/Configuration;Z)Lorg/apache/spark/streaming/StreamingContext;" the class loader (instance of org/apache/spark/util/ChildFirstURLClassLoader) of the current class and the class loader (instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, org/apache/spark/streaming/StreamingContext$, have different Class objects for the type scala/Function0 used in the signature |
You have conflicting versions of scala in the mix.
I strongly recommend working with fat jar assemblies to avoid this.
On Wed, Sep 27, 2017 at 10:18 geek311 ***@***.***> wrote:
On Building the jar from the master branch it gives me the
spark-avro-assembly-4.0.0-SNAPSHOT.jar and if on the CDH cluster i replace
the spark-avro-3.2.0 jar with this newly built jar from the master branch
and then spark-submit with --jars having the new assembly jar then it is
giving me LinkageError. Can you pls tell me how to solve this? What changes
do i need to make in my sbt to point to this assembly jar? I have only
passed it in the cluster as --jars
Exception in thread "main" java.lang.LinkageError: loader constraint
violation: when resolving method
"org.apache.spark.streaming.StreamingContext$.getOrCreate(Ljava/lang/String;Lscala/Function0;Lorg/apache/hadoop/conf/Configuration;Z)Lorg/apache/spark/streaming/StreamingContext;"
the class loader (instance of
org/apache/spark/util/ChildFirstURLClassLoader) of the current class and
the class loader (instance of sun/misc/Launcher$AppClassLoader) for the
method's defining class, org/apache/spark/streaming/StreamingContext$, have
different Class objects for the type scala/Function0 used in the signature
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#240 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABLqOCGkFO31nBCT860YZc6zKSSuLbZfks5smllAgaJpZM4OWLCV>
.
--
Marcin Tustin
Tel: +1 917 553 3974
|
I have the following in my project/plugins.sbt for building the fat jar. And my sbt has - And build.sbt has all project.settings set to scalaVersion := 2.11.8 I have put the spark-avro-assembly-4.0.0-SNAPSHOT.jar in the [root]/lib directory and also tried putting it in the sub-project/lib directory as my root project has many sub-projects. Is there anything else I need to do in my sbt to point to my local snapshot jar? My scala version is 2.11.8. I am using Intellij Idea and I see Scala 2.11.8 jars in my idea libraries but i also do see scala 2.10 in ~/.sbt folder and ~/.ivy2/cache folders. I had cleaned them but they reappear - how I can I fix this? I don't get the linkage error if I don't use the SNAPSHOT jar and just these - But then it is back to square one of InternalRow error |
I am not getting any linkage error with the published spark-avro 3.2.0 jar while using with redshift 3.0.0-preview1 jar. But on checking out the master branch and building the jar using sbt assembly, and adding it as an unmanaged dependency in sbt root/lib, the LinkageError comes. Any advice? Or when can this fix be published ? |
I was able to resolve that error and now I am getting the following - is there something else i need to change in the patched master jar for spark 2.2 CDH 5.10 cluster?
|
+1 waiting for the release. Is there anything that is blocking the release? |
After days of trying several options, I found a simple workaround. Hope this saves people's tons of time and a lot of frustration! Maynot be super effecient but this one line change saves the botheration of building from master, applying that patch in the cluster (plus other problems that go with it). Atleast temporarily till the jar is released |
I'm hitting the same error with spark-avro 3.2.0 against spark 2.1.0 |
thanks a lot for the csv workaround @geek311 |
Hey, question for the engineering team here - how are you handling cross-spark-version compatibility? I'm running into the same issue with a custom OutputWriter implementation, and not sure how to support both Spark 2.1 and Spark 2.2, as this is a breaking change. I don't really want to maintain two branches... Suggestions as to how you're planning on handling this - or if you're just going to have a min required spark version - would be appreciated. |
cc @gengliangwang Could you take a look at this issue? |
We will make a release recently. Sorry for the waiting. |
Hello, thanks for solving this issue. Any ETA on the release? Thanks! |
How can i get the latest release ? |
Yes i got that and its just working great !! Thank you. |
We will send out a release announcement soon. Thanks! |
thanks guys |
I'm trying to upgrade to the recently released spark 2.2.0. I'm using
spark-avro
version 3.2.0 and I get the following error when trying to write to an avro file.At first glance it appeared to be related to #208 but on closer inspection the problem here is the
OutputWriter.write
method and notOutputWriterFactory.getFileExtension
which was causing trouble with the spark 2.1.0 upgrade.Happy to provide more info or help debug, just let me know!
The text was updated successfully, but these errors were encountered: