apache/kyuubi
在 GitHub 查看[TASK][EASY] Support setting the username to launch Kyuubi engines in USER & CONNECTION share level
Open
#5,369 创建于 2023年10月8日
hacktoberfest
仓库指标
- Star
- (2,332 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
Code of Conduct
- I agree to follow this project's Code of Conduct
Search before creating
- I have searched in the task list and found no similar tasks.
Mentor
- I have sufficient knowledge and experience of this task, and I volunteer to be the mentor of this task to guide contributors to complete the task.
Skill requirements
- Basic knowledge on Scala Programing Language
Background and Goals
Hive supports SQL operation authorization against the session user, and then runs SQL as Hive Server user.
Currently, Kyuubi supports this feature at the SERVER share level.
We want to also support this feature in other share levels, which provide fine isolation.
Implementation steps
Currently, EngineRef#appUser serves two purposes:
- The username used to run the
SparkSQLEngine - Part of the key used to look up the
SparkSQLEngineto connect to.
To implement this feature, we need to replace EngineRef#appUser with two new fields, EngineRef#appUser and EngineRef#engineSpaceUser.
- The new
EngineRef#appUseris the username used to run theSparkSQLEngine. - The
EngineRef#engineSpaceUseris used to look up theSparkSQLEngine.
EngineRef#engineSpaceUser is set in the same way as the old EngineRef#appUser.
The new EngineRef#appUser is set according to a new config, kyuubi.engine.user:
- When
kyuubi.engine.useris not set, setEngineRef#appUsertoEngineRef#engineSpaceUser - When
kyuubi.engine.useris set, setEngineRef#appUserto that value.
Additional context
No response