Skip to content

Commit

Permalink
[SPARK-44849] Expose SparkConnectExecutionManager.listActiveExecutions
Browse files Browse the repository at this point in the history
### 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 <julek@databricks.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>
  • Loading branch information
juliuszsompolski authored and hvanhovell committed Aug 17, 2023
1 parent 72a4668 commit 047b224
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,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
*/
Expand Down

0 comments on commit 047b224

Please sign in to comment.