Skip to content

Commit

Permalink
why so slow try 2
Browse files Browse the repository at this point in the history
  • Loading branch information
xupefei committed Oct 10, 2024
1 parent c9cf1a2 commit be49405
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import org.apache.spark.sql.{Artifact, SparkSession}
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.util.ArtifactUtils
import org.apache.spark.storage.{BlockManager, CacheId, StorageLevel}
import org.apache.spark.util.{ChildFirstURLClassLoader, JoinClassLoader, StubClassLoader, Utils}
import org.apache.spark.util.{ChildFirstURLClassLoader, StubClassLoader, Utils}

/**
* This class handles the storage of artifacts as well as preparing the artifacts for use.
Expand Down Expand Up @@ -281,8 +281,7 @@ class ArtifactManager(session: SparkSession) extends Logging {
val urls = getAddedJars :+ classDir.toUri.toURL
val prefixes = SparkEnv.get.conf.get(CONNECT_SCALA_UDF_STUB_PREFIXES)
val userClasspathFirst = SparkEnv.get.conf.get(EXECUTOR_USER_CLASS_PATH_FIRST)
val fallbackClassLoader = // jarClassLoader -> contextClassLoader
new JoinClassLoader(session.sharedState.jarClassLoader, Utils.getContextOrSparkClassLoader)
val fallbackClassLoader = Utils.getContextOrSparkClassLoader
val loader = if (prefixes.nonEmpty) {
// Two things you need to know about classloader for all of this to make sense:
// 1. A classloader needs to be able to fully define a class.
Expand Down

0 comments on commit be49405

Please sign in to comment.