Skip to content

Commit

Permalink
Fix Spark 3.5.0 shell classloader issue with the plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Graves <[email protected]>
  • Loading branch information
tgravescs committed Oct 20, 2023
1 parent 1baa350 commit f38e136
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ object ShimLoader extends Logging {
// fast path
logInfo(s"findURLClassLoader found a URLClassLoader $urlCl")
Option(urlCl)
case replCl if replCl.getClass.getName == "org.apache.spark.repl.ExecutorClassLoader" =>
case replCl if replCl.getClass.getName == "org.apache.spark.repl.ExecutorClassLoader" ||
replCl.getClass.getName == "org.apache.spark.executor.ExecutorClassLoader" =>
// Spark 3.5.0 changed the package of ExecutorClassLoader so we check for it being
// either old package name or new one.
// https://issues.apache.org/jira/browse/SPARK-18646
val parentLoader = MethodUtils.invokeMethod(replCl, true, "parentLoader")
.asInstanceOf[ClassLoader]
Expand Down

0 comments on commit f38e136

Please sign in to comment.