Nflrijal commented on code in PR #58243:
URL: https://github.com/apache/spark/pull/58243#discussion_r3963577490
##########
core/src/main/scala/org/apache/spark/SparkContext.scala:
##########
@@ -2405,9 +2419,24 @@ class SparkContext(config: SparkConf) extends Logging {
ResourceProfile.clearDefaultProfile()
// Unset YARN mode system env variable, to allow switching between cluster
types.
SparkContext.clearActiveContext()
+ if (_proxyBaseSetByContext) {
+ _previousProxyBase match {
+ case Some(oldBase) if !isAppSpecificProxyBase(oldBase) =>
+ System.setProperty("spark.ui.proxyBase", oldBase)
+ case _ =>
+ System.clearProperty("spark.ui.proxyBase")
Review Comment:
Thanks for catching this!
I've updated `SparkContext.stop()` to move the `_proxyBaseSetByContext`
property cleanup before `clearActiveContext()` (and `localProperties.remove()`
/ `ResourceProfile.clearDefaultProfile()`). This ensures `spark.ui.proxyBase`
is restored/cleared atomically before any replacement context can register and
set its own property.
--
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]