Code Monkey home page Code Monkey logo

Comments (7)

thesamet avatar thesamet commented on May 24, 2024

Hi @larssk , a version that supports Spark 3.3 was only released yesterday (as a fix for this ticket). Please make sure you use the right version of sparksql-scalapb according to the list here: https://scalapb.github.io/docs/sparksql/#setting-up-your-project

from scalapb.

larssk avatar larssk commented on May 24, 2024

Thanks for the update ! Looks like this triggers a new issue: Task not serializable exception
Caused by: java.io.NotSerializableException: scalapb.descriptors.FieldDescriptor

Similar to issue 278 but I couldn't figure out the fix for it.

Tested with

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.1.0")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.6")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.13"
scalaVersion := "2.12.13"
val sparkVersion = "3.3.0"
libraryDependencies += "com.thesamet.scalapb" %% "sparksql33-scalapb0_11" % "1.0.2"
Serialization stack:
	- object not serializable (class: scalapb.descriptors.FieldDescriptor, value: )
	- element of array (index: 4)
	- array (class [Ljava.lang.Object;, size 10)
	- element of array (index: 1)
	- array (class [Ljava.lang.Object;, size 3)
	- field (class: java.lang.invoke.SerializedLambda, name: capturedArgs, type: class [Ljava.lang.Object;)
	- object (class java.lang.invoke.SerializedLambda, SerializedLambda[capturingClass=class org.apache.spark.sql.execution.WholeStageCodegenExec, functionalInterfaceMethod=scala/Function2.apply:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;, implementation=invokeStatic org/apache/spark/sql/execution/WholeStageCodegenExec.$anonfun$doExecute$4$adapted:(Lorg/apache/spark/sql/catalyst/expressions/codegen/CodeAndComment;[Ljava/lang/Object;Lorg/apache/spark/sql/execution/metric/SQLMetric;Ljava/lang/Object;Lscala/collection/Iterator;)Lscala/collection/Iterator;, instantiatedMethodType=(Ljava/lang/Object;Lscala/collection/Iterator;)Lscala/collection/Iterator;, numCaptured=3])
	- writeReplace data (class: java.lang.invoke.SerializedLambda)

from scalapb.

thesamet avatar thesamet commented on May 24, 2024

Please provide a minimal example to reproduce the issue, ideally this can be done in a fork of https://github.com/thesamet/sparksql-scalapb-test or a failing test under the sparksql-scalapb/src/test/ directory in this repo.

from scalapb.

larssk avatar larssk commented on May 24, 2024

Producing and consuming within this project works as expected:
thesamet/sparksql-scalapb-test@master...larssk:sparksql-scalapb-test-spark33:master

But the problem persists when reading from an existing topic. Checking..

from scalapb.

larssk avatar larssk commented on May 24, 2024

Works on Spark 3.3.2. Fails on Spark 3.3.0, with java.io.NotSerializableException.

Command to execute:

spark-3.3.0-bin-hadoop3/bin/spark-submit --jars . --class myexample.RunDemo target/scala-2.12/sparksql-scalapb-test-spark33-assembly-1.0.0.jar

from scalapb.

larssk avatar larssk commented on May 24, 2024

I've updated the description in order to reproduce the issue:
https://github.com/larssk/sparksql-scalapb-test-spark33/blob/master/README.md

I get the same error locally as on dataproc (which is unfortunately limited to Spark 3.3.0).

from scalapb.

thesamet avatar thesamet commented on May 24, 2024

Hi @larssk , thanks for creating an example - I was able to reproduce. As far as I can tell this is a Spark bug that has been fixed. We'd have to wait for dataproc to support latest version.

from scalapb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.