[FEA] create the plugin package capable of storing conflicting multiple versions of same named classes #3232
Labels
P0
Must have for release
Spark 3.1+
Bugs only related to Spark 3.1 or higher
task
Work required that improves the product but is not user facing
Milestone
Is your feature request related to a problem? Please describe.
This feature contributes to #3223. Spark does not provide link compatibility. Therefore identical classes compiled against different spark versions may result in incompatible bytecode. We need to save multiple copies of such classes in the plugin jar. Standard way of using ASM-based shading/relocation does not work well with Scala.
Describe the solution you'd like
This issue proposes an approach similar to ParallelWorldClassLoader. Instead of overriding
findClass
in Spark we can lean onMutableURLClassLoader
in conjunction with JarURLConnection JAR URLsThe package will consist of three types of areas
So each shim can see a consistent parallel world without conflicts by referencing only one conflicting directory.
E.g., Spark 3.2.0 Shim will use
Spark 3.1.1 will use
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: