kyuubi/extensions/spark
wankunde 04f443792b [KYUUBI #6754][AUTHZ] Improve the performance of Ranger access requests deduplication
# 🔍 Description
## Issue References 🔗

This pull request fixes #6754

## Describe Your Solution 🔧

Right now in RuleAuthorization we use an ArrayBuffer to collect access requests, which is very slow because each new PrivilegeObject needs to be compared with all access requests.

## Types of changes 🔖

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

Add benchmark
Before
```sh
Java HotSpot(TM) 64-Bit Server VM 17.0.12+8-LTS-286 on Mac OS X 14.6
Apple M3
Collecting files ranger access request:   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
50000 files benchmark                            181863         189434         NaN         -0.0 -181863368958.0       1.0X
````

#### Behavior With This Pull Request 🎉

After
```sh
Java HotSpot(TM) 64-Bit Server VM 17.0.12+8-LTS-286 on Mac OS X 14.6
Apple M3
Collecting files ranger access request:   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
50000 files benchmark                              1281           1310          33         -0.0 -1280563000.0       1.0X
```

#### Related Unit Tests

Exists UT

---

# Checklist 📝

- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

**Be nice. Be informative.**

Closes #6758 from wankunde/ranger2.

Closes #6754

9d7d1964b [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
88b9c049b [wankun] Update extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/spark/sql/RuleAuthorizationBenchmark.scala
20c55fbeb [wankun] Update extensions/spark/kyuubi-spark-authz/pom.xml
f5a3b6ca5 [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
9793249de [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
d86b01f9c [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
b904b491b [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
aad08a6bb [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
1374604bc [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests
01e15c149 [wankun] Update extensions/spark/kyuubi-spark-authz/pom.xml
805e8a9c0 [wankun] Update extensions/spark/kyuubi-spark-authz/pom.xml
e19817943 [wankunde] [KYUUBI #6754] Improve the performance of ranger access requests

Lead-authored-by: wankunde <wankunde@163.com>
Co-authored-by: wankun <wankun@apache.org>
Signed-off-by: Bowen Liang <liangbowen@gf.com.cn>
2024-10-21 21:17:51 +08:00
..
kyuubi-extension-spark-3-3 [KYUUBI #6582] [KYUUBI-6581] Zorder clause syntax does not support special characters 2024-08-06 13:39:25 +08:00
kyuubi-extension-spark-3-4 [KYUUBI #6582] [KYUUBI-6581] Zorder clause syntax does not support special characters 2024-08-06 13:39:25 +08:00
kyuubi-extension-spark-3-5 [KYUUBI #6582] [KYUUBI-6581] Zorder clause syntax does not support special characters 2024-08-06 13:39:25 +08:00
kyuubi-extension-spark-jdbc-dialect [KYUUBI #6545] Deprecate and remove building support for Spark 3.2 2024-07-22 11:59:34 +08:00
kyuubi-spark-authz [KYUUBI #6754][AUTHZ] Improve the performance of Ranger access requests deduplication 2024-10-21 21:17:51 +08:00
kyuubi-spark-authz-shaded [KYUUBI #6638][FOLLOWUP] Authz shaded should include jsr311-api 2024-10-15 17:24:07 +08:00
kyuubi-spark-connector-common [KYUUBI #6545] Deprecate and remove building support for Spark 3.2 2024-07-22 11:59:34 +08:00
kyuubi-spark-connector-hive [KYUUBI #6699] Bump Spark 4.0.0-preview2 2024-09-23 17:42:48 +08:00
kyuubi-spark-connector-tpcds [KYUUBI #6545] Deprecate and remove building support for Spark 3.2 2024-07-22 11:59:34 +08:00
kyuubi-spark-connector-tpch [KYUUBI #6545] Deprecate and remove building support for Spark 3.2 2024-07-22 11:59:34 +08:00
kyuubi-spark-jvm-quake [KYUUBI #5402] Introduce Spark JVM quake plugin 2024-09-02 12:29:41 +08:00
kyuubi-spark-lineage [KYUUBI #6672] Cleanup unused Commons Lang 2 dependency 2024-09-05 17:44:20 +08:00