apache / apache/kyuubi

[FEATURE][AUTHZ] Improve performance of authz rules

Open
#7,079 1 comment 0 reactions 1 assignee Claimed by @wForget View on GitHub
kind:feature priority:major
Dominant language
Scala
Stars
2.4k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

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

### Search before asking

- [x] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.

### Describe the feature

Constantize some properties to reduce object creation:
+ AccessRequest initialization requires reflection methods: https://github.com/apache/kyuubi/blob/cad5a392f3195d8f3b16c293a11ac54c2f090871/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AccessRequest.scala#L48-L52

![Image](https://github.com/user-attachments/assets/80c7961e-67c9-4fe1-a000-4b4541ed8551)

+ ~~RuleHelper.ugi~~ (different sparkSession may have different authz ugi): https://github.com/apache/kyuubi/blob/cad5a392f3195d8f3b16c293a11ac54c2f090871/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/RuleHelper.scala#L50

### Motivation

_No response_

### Describe the solution

_No response_

### Additional context

_No response_

### Are you willing to submit PR?

- [x] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve.
- [ ] No. I cannot submit a PR at this time.

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.