When trying to use Beam with spark 3.1.2 we are running into this issue :
InvalidClassException: scala.collection.mutable.WrappedArray
As explained here : https://www.mail-archive.com/issues@spark.apache.org/msg297820.html
It's an incompatibility issue : spark 3.1.2 is compiled with scala 2.12.10 but this issue is fixed only for scala >= 2.12.14.
I see two solutions :
=> compiling spark & beam with a scala version >= 2.12.14
=> upgrading the spark version used by beam to 3.2.0, which can be compiled with scala 2.13
But both solutions could be long (need to understand beam source code), any idea ?
EDIT 21/01/2022:
My question is : do you think there is a simple workaround to this issue ?
I just found that a Jira ticket was already open about it : https://issues.apache.org/jira/browse/BEAM-12762
Thanks for your answer @Moritz but I don't see how to do it right now ; how can I package an other version of Sclala in the Beam Docker Image without compiling Beam ?