apache / apache/kyuubi

[TASK][MEDIUM] Resource isolation in Spark Scala mode

Open
#6,265 3 comments 0 reactions 1 assignee Claimed by @beryllw View on GitHub
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### What's the level of this task?

MEDIUM

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

### Search before creating

- [X] I have searched in the [task list](https://github.com/orgs/apache/projects/343) and found no similar tasks.

### Mentor

- [ ] I have sufficient expertise on this task, and I volunteer to be a mentor of this task to guide contributors through the task.

### Skill requirements

- Knowledge of Spark/Scala REPL
- Knowledge of Classloader, JVM serialization

### Background and Goals

The current Kyuubi Scala mode reuses the code of Spark Shell, while Spark Shell is designed for single session and client deploy mode, which has certain limitations for Kyuubis multi-tenant use cases.

Thanks to Spark Connect, a similar mechanism is required to support isolated sessions (i.e. isolated resources/classloader) so that each REPL user does not conflict with other users on the same cluster.

As of Spark 3.5, the core/sql already has infrastructure to support isolated resources/classloader, see details in

- SPARK-44078
- SPARK-44146
- SPARK-45856

### Implementation steps

Investigate how could Kyuubi Spark Scala mode leverage those infrastructures to support session-level isolated resources/classloader in Spark 3.5+

### Additional context

Introduction of [2024H1 Kyuubi Code Contribution Program](https://github.com/apache/kyuubi/issues/6232)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.