This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git
The following commit(s) were added to refs/heads/master by this push:
new 05b8939c [AURON #1409] followup to always get active context (#1433)
05b8939c is described below
commit 05b8939cc35cedc045abe36dc540123884daaf85
Author: Junfan Zhang <[email protected]>
AuthorDate: Fri Oct 17 11:30:08 2025 +0800
[AURON #1409] followup to always get active context (#1433)
Co-authored-by: Zhen Wang <[email protected]>
---
.../src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/spark-extension-shims-spark3/src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala
b/spark-extension-shims-spark3/src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala
index 0ba63c8e..1e2533f1 100644
---
a/spark-extension-shims-spark3/src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala
+++
b/spark-extension-shims-spark3/src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala
@@ -158,7 +158,9 @@ class ShimsImpl extends Shims with Logging {
.get(AuronConf.UI_ENABLED.key, "true"))
if (SparkEnv.get.conf.get(AuronConf.UI_ENABLED.key,
"true").equals("true")) {
- val sparkContext = SparkContext.getOrCreate()
+ val sparkContext = SparkContext.getActive.getOrElse {
+ throw new IllegalStateException("No active spark context found that
should not happen")
+ }
val kvStore =
sparkContext.statusStore.store.asInstanceOf[ElementTrackingStore]
val statusStore = new AuronSQLAppStatusStore(kvStore)
sparkContext.ui.foreach(new AuronSQLTab(statusStore, _))