xupefei commented on code in PR #48120:
URL: https://github.com/apache/spark/pull/48120#discussion_r1775548583
##########
sql/core/src/main/scala/org/apache/spark/sql/artifact/ArtifactManager.scala:
##########
@@ -67,12 +67,18 @@ class ArtifactManager(session: SparkSession) extends
Logging {
s"$artifactRootURI${File.separator}${session.sessionUUID}")
// The base directory/URI where all class file artifacts are stored for this
`sessionUUID`.
- protected[artifact] val (classDir, classURI): (Path, String) =
+ protected[artifact] val (classDir, replClassURI): (Path, String) =
(ArtifactUtils.concatenatePaths(artifactPath, "classes"),
s"$artifactURI${File.separator}classes${File.separator}")
- protected[artifact] val state: JobArtifactState =
- JobArtifactState(session.sessionUUID, Option(classURI))
+ protected[sql] lazy val state: JobArtifactState = {
+ val isIsolated =
session.sparkContext.conf.get("spark.sql.session.isolateArtifacts", "false")
+ if (isIsolated == "true") {
+ JobArtifactState(session.sessionUUID, Some(replClassURI))
+ } else {
+ null
+ }
Review Comment:
We have to fully turn off resource isolation not to break these magical
classpath manipulations:
1. REPL inline artifacts folder `spark.repl.class.outputDir` and
`spark.repl.class.uri`.
2. Hive-related JARS loaded from `hive.aux.jars.path`:
https://github.com/apache/spark/blob/80d6651cf6a1835d0de3e12e08253d2a9816d499/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala#L168-L172
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]