This is an automated email from the ASF dual-hosted git repository. hvanhovell pushed a commit to branch branch-3.5 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push: new 893940db795 [SPARK-44849] Expose SparkConnectExecutionManager.listActiveExecutions 893940db795 is described below commit 893940db79500d7faf3263cd75b96a814aa0f279 Author: Juliusz Sompolski <ju...@databricks.com> AuthorDate: Thu Aug 17 17:49:28 2023 +0200 [SPARK-44849] Expose SparkConnectExecutionManager.listActiveExecutions ### What changes were proposed in this pull request? Make list of active executions accessible via SparkConnectService.listActiveExecutions ### Why are the changes needed? Some internal components outside `connect` would like to have access to that. Add a method to expose it. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? CI Closes #42535 from juliuszsompolski/SPARK-44849. Authored-by: Juliusz Sompolski <ju...@databricks.com> Signed-off-by: Herman van Hovell <her...@databricks.com> (cherry picked from commit 047b2247879cc3f5fd9b78366a73edbf62994811) Signed-off-by: Herman van Hovell <her...@databricks.com> --- .../org/apache/spark/sql/connect/service/SparkConnectService.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala index 15a7782c367..e8af2acfd2e 100644 --- a/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala +++ b/connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala @@ -347,6 +347,12 @@ object SparkConnectService extends Logging { userSessionMapping.get((userId, sessionId), default) } + /** + * If there are no executions, return Left with System.currentTimeMillis of last active + * execution. Otherwise return Right with list of ExecuteInfo of all executions. + */ + def listActiveExecutions: Either[Long, Seq[ExecuteInfo]] = executionManager.listActiveExecutions + /** * Used for testing */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org